- Create and open it: this is done with either
- wxTextFile::Create or wxTextFile::Open
- function which opens the file (name may be specified either as the argument to
- these functions or in the constructor), reads its contents in memory (in the
- case of @c Open()) and closes it.
- Work with the lines in the file: this may be done either with "direct
- access" functions like wxTextFile::GetLineCount and
- wxTextFile::GetLine (@e operator[] does exactly the same
- but looks more like array addressing) or with "sequential access" functions
- which include wxTextFile::GetFirstLine/
- wxTextFile::GetNextLine and also
- wxTextFile::GetLastLine/wxTextFile::GetPrevLine.
- For the sequential access functions the current line number is maintained: it is
- returned by wxTextFile::GetCurrentLine and may be
- changed with wxTextFile::GoToLine.
- Add/remove lines to the file: wxTextFile::AddLine and
- wxTextFile::InsertLine add new lines while
- wxTextFile::RemoveLine deletes the existing ones.
- wxTextFile::Clear resets the file to empty.
- Save your changes: notice that the changes you make to the file will @b not be
- saved automatically; calling wxTextFile::Close or doing
- nothing discards them! To save the changes you must explicitly call
- wxTextFile::Write - here, you may also change the line
- termination type if you wish.
-
+ - Create and open it: this is done with either wxTextFile::Create or wxTextFile::Open
+ function which opens the file (name may be specified either as the argument to
+ these functions or in the constructor), reads its contents in memory (in the
+ case of wxTextFile::Open()) and closes it.
+ - Work with the lines in the file: this may be done either with "direct
+ access" functions like wxTextFile::GetLineCount and wxTextFile::GetLine
+ (@e operator[] does exactly the same but looks more like array addressing)
+ or with "sequential access" functions which include wxTextFile::GetFirstLine,
+ wxTextFile::GetNextLine and also wxTextFile::GetLastLine, wxTextFile::GetPrevLine.
+ For the sequential access functions the current line number is maintained: it is
+ returned by wxTextFile::GetCurrentLine and may be changed with wxTextFile::GoToLine.
+ - Add/remove lines to the file: wxTextFile::AddLine and wxTextFile::InsertLine
+ add new lines while wxTextFile::RemoveLine deletes the existing ones.
+ wxTextFile::Clear resets the file to empty.
+ - Save your changes: notice that the changes you make to the file will @b not be
+ saved automatically; calling wxTextFile::Close or doing nothing discards them!
+ To save the changes you must explicitly call wxTextFile::Write - here, you may
+ also change the line termination type if you wish.