Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

YSourceFile Class Reference

#include <filedialog.h>

Inheritance diagram for YSourceFile:

Inheritance graph
[legend]
Collaboration diagram for YSourceFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 YSourceFile (const QString &f)
 ~YSourceFile ()
void FinalizeFile ()
 Close an opened file and reset modification date to lastmodification if contentschanged=false.

bool CheckImportant (const QString &string) const
 Check if this is an important line.

int OpenFile ()
 Opens the file, request last modification time loads old file to stringlist, truncates the file to 0.

int WriteLine (const QString &line)
int WriteImportant (const QString &line)
int WriteUnimportant (const QString &line=QString::null)
 Write the specified string to YFile and makes a newline.


Private Attributes

bool contentchanged
QDateTime lastmodified
QStringList oldcontents

Detailed Description

This class is used to write source/header files again and restore the modification date. The file will be loaded and all important lines will be stored in the member "QStringList oldcontents". During writing the new contents each important line will be compared with the contents of the list. If all contents match to the original modofocation date will be restored. Attention: It is very important that every important line exists only once!


Constructor & Destructor Documentation

YSourceFile::YSourceFile const QString &    f [inline]
 

YSourceFile::~YSourceFile   [inline]
 


Member Function Documentation

bool YSourceFile::CheckImportant const QString &    string const [inline]
 

Check if this is an important line.

void YSourceFile::FinalizeFile   [inline]
 

Close an opened file and reset modification date to lastmodification if contentschanged=false.

int YSourceFile::OpenFile  
 

Opens the file, request last modification time loads old file to stringlist, truncates the file to 0.

Opens the file, request last modification time loads old file to stringlist, truncates the file to 0

int YSourceFile::WriteImportant const QString &    line [inline]
 

int YSourceFile::WriteLine const QString &    line
 

int YSourceFile::WriteUnimportant const QString &    line = QString::null [inline]
 

Write the specified string to YFile and makes a newline.


Member Data Documentation

bool YSourceFile::contentchanged [private]
 

This flag indicated the how to set the modification date after writing the file If it is true the date stamp is set to current time if not it is reset to it original state (see member lastmodified).

QDateTime YSourceFile::lastmodified [private]
 

QStringList YSourceFile::oldcontents [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Feb 14 00:02:51 2003 for Yasa by doxygen1.3-rc3