Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | List of all members
utils.ResultFile Class Reference

Class used to create auto-zipping result files. At each iteration, the file is added to an archive. More...

Public Member Functions

 ResultFile (String outPath, String fileName, int iter)
 Creates a result file within a specified folder, of a particular name, and at a set simulation iteration. More...
 
void openFile (int iter)
 Creates a result file for the current iteration. More...
 
void write (String text)
 Add text to an existing resultFile. More...
 
void closeFile ()
 Closes the resultFile and adds the closing mark-up to have a well-formed XML file. More...
 

Static Public Member Functions

static boolean copyFile (String sourceName, String targetName)
 Static function invoked to copy a File of a given name to a specified target. More...
 

Detailed Description

Class used to create auto-zipping result files. At each iteration, the file is added to an archive.

Class used to create auto-zipping result files. At each iteration, the file is added to an archive. The last iteration is still available with the syntax "resultFileName(last)"

Author
Laurent Lardon (lardo.nosp@m.nl@s.nosp@m.upagr.nosp@m.o.in.nosp@m.ra.fr), INRA, France
Brian Merkey (brim@.nosp@m.env..nosp@m.dtu.d.nosp@m.k, bvm@n.nosp@m.orth.nosp@m.weste.nosp@m.rn.e.nosp@m.du), Department of Engineering Sciences and Applied Mathematics, Northwestern University (USA)

Constructor & Destructor Documentation

utils.ResultFile.ResultFile ( String  outPath,
String  fileName,
int  iter 
)

Creates a result file within a specified folder, of a particular name, and at a set simulation iteration.

Creates a result file within a specified folder, of a particular name, and at a set simulation iteration

Parameters
outPathdirectory where result files will be saved
fileNamename of the resultFile
iterfirst iterate to start writing to (added bvm 26.1.2009)

Member Function Documentation

void utils.ResultFile.closeFile ( )

Closes the resultFile and adds the closing mark-up to have a well-formed XML file.

Closes the resultFile and adds the closing mark-up to have a well-formed XML file

static boolean utils.ResultFile.copyFile ( String  sourceName,
String  targetName 
)
static

Static function invoked to copy a File of a given name to a specified target.

Static function invoked to copy a File of a given name to a specified target

Parameters
sourceNameThe name of the results file to copy
targetNameThe name that should be given to the copy
Returns
Boolean noting the result of the copy procedure
void utils.ResultFile.openFile ( int  iter)

Creates a result file for the current iteration.

Create a resultFile for the current iteration

Exceptions
ExceptionGenerated exception should read errors occur
Parameters
iterThe current simulation iteration (added by BVM Jan 2009)
void utils.ResultFile.write ( String  text)

Add text to an existing resultFile.

Add text to an existing resultFile

  • Parameters
    textThe text that should be appended to this results file

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