MyFile Class Reference

MyFile is a silly abstraction to a text file which contains data saved by the application. More...

#include <MyFile.h>

List of all members.

Public Member Functions

 MyFile ()
 ~MyFile ()
bool openRead (const char *filename)
bool openWrite (const char *filename)
void close ()
int seekString (const char *str, const char *stopat)
int seekHeader (const char *hName)
int seekValue (const char *vName, int level=0, bool bFromStart=false)
int readNumsBuf (int cnt, int *buffer)
int readNums (int cnt,...)
int writeHeader (const char *hName)
int writeValue (const char *vName, bool endCRLF, int level=0)
int writeNumsBuf (int cnt, int *buffer, bool endCRLF=true)
int writeNums (int cnt, bool endCRLF,...)
int writeStr (const char *st)
int getState ()

Private Attributes

QString name
int state
int curHeader
FILE * fl

Detailed Description

MyFile is a silly abstraction to a text file which contains data saved by the application.

MyFile is the format of the solution or shape files saved by the application. it is supposed to be hierarchical in nature. Implementing a hierarchical data format from scratch turned out to be not such a great idea. The saved files should be moved to XML format and this class should be removed.

See also:

Constructor & Destructor Documentation

MyFile::MyFile (  )  [inline]

MyFile::~MyFile (  )  [inline]

Member Function Documentation

bool MyFile::openRead ( const char *  filename  ) 

bool MyFile::openWrite ( const char *  filename  ) 

void MyFile::close (  ) 

int MyFile::seekString ( const char *  str,
const char *  stopat 

int MyFile::seekHeader ( const char *  hName  ) 

int MyFile::seekValue ( const char *  vName,
int  level = 0,
bool  bFromStart = false 

int MyFile::readNumsBuf ( int  cnt,
int *  buffer 

int MyFile::readNums ( int  cnt,

int MyFile::writeHeader ( const char *  hName  ) 

int MyFile::writeValue ( const char *  vName,
bool  endCRLF,
int  level = 0 

int MyFile::writeNumsBuf ( int  cnt,
int *  buffer,
bool  endCRLF = true 

int MyFile::writeNums ( int  cnt,
bool  endCRLF,

int MyFile::writeStr ( const char *  st  ) 

int MyFile::getState (  )  [inline]

Member Data Documentation

QString MyFile::name [private]

int MyFile::state [private]

int MyFile::curHeader [private]

FILE* MyFile::fl [private]

The documentation for this class was generated from the following files: