casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casacore::NewFile Class Reference

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

#include <NewFile.h>

Public Member Functions

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

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

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

Currently the deleteIfExists argument has no affect.

casacore::NewFile::NewFile ( const NewFile other)

Copy constructor (copy semantics)

casacore::NewFile::~NewFile ( )

Destructor.

Member Function Documentation

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

Assignment (copy semantics)

Bool casacore::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

Bool casacore::NewFile::delete_p
private

Definition at line 95 of file NewFile.h.


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