My Project
Public Member Functions
ReadWriteTextFile Class Reference

#include <ReadWriteTextFile.hh>

List of all members.

Public Member Functions

 ReadWriteTextFile (string _FileName, UInt4 _LockFlag=0)
 ~ReadWriteTextFile ()
void ReSetTarget (string _FileName, UInt4 _LockFlag=0)
void Read ()
vector< string > Put ()
void Write (vector< string > StrVec)

Detailed Description

This class cannot work on MacOS system. Because the function of "fopen()" is different from that on Linux and FreeBSD system.


Constructor & Destructor Documentation

ReadWriteTextFile::ReadWriteTextFile ( string  _FileName,
UInt4  _LockFlag = 0 
)

Constructor. In ordinary case, you can omit the second argument. The target file will be open in append mode.

Destructor. When this method is called, the file descriptor defined in the constructor will be closed.


Member Function Documentation

The file descriptor opened by the constructor is re-opened in read-mode, and read the target file. The contents of the target file can be obtained with vector<string> Put().

void ReadWriteTextFile::Write ( vector< string >  StrVec)

The argument of vector<string> is written to the target file. Each element in "StrVec" corresponds to each line in the file. The target file will be closed in the destructor of this class.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends