casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::NewFile Class Reference

Do checks for a new (non-existent) file. More...

#include <NewFile.h>

List of all members.

Public Member Functions

 NewFile (Bool deleteIfExists=True)
 Currently the deleteIfExists argument has no affect.
 NewFile (const NewFile &other)
 Copy constructor (copy semantics)
NewFileoperator= (const NewFile &other)
 Assignment (copy semantics)
 ~NewFile ()
 Destructor.
Bool valueOK (const String &value, String &error) const
 Indicates whether the specified string is a valid new file, invoking the choice GUI.

Private Attributes

Bool delete_p

Detailed Description

Do checks for a new (non-existent) file.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Use this if you want a New File.

Synopsis

NewFile is a class checking if a new file already exists. If the file exists, then the user is asked via Choice::choice whether or not he or she wants to delete the file before using it.

Example

NewFile validFile; String newFileName("bigone"), error; Bool ok = validFile.valueOK(newFileName, error); if (!ok) { cout << error << endl; }

Motivation

Output file names are fairly common parameters, this consolidates the error checking and "remove if it already exists" logic.

To Do

Definition at line 74 of file NewFile.h.


Constructor & Destructor Documentation

casa::NewFile::NewFile ( Bool  deleteIfExists = True)

Currently the deleteIfExists argument has no affect.

casa::NewFile::NewFile ( const NewFile other)

Copy constructor (copy semantics)

Destructor.


Member Function Documentation

NewFile& casa::NewFile::operator= ( const NewFile other)

Assignment (copy semantics)

Bool casa::NewFile::valueOK ( const String value,
String error 
) const

Indicates whether the specified string is a valid new file, invoking the choice GUI.

If it returns False, an error message is returned.


Member Data Documentation

Definition at line 95 of file NewFile.h.


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