casacore
Public Member Functions | Private Attributes | List of all members
casacore::MaskSpecifier Class Reference

More...

#include <MaskSpecifier.h>

Public Member Functions

 MaskSpecifier (Bool useDefaultMask=True)
 Default constructor. More...
 
 MaskSpecifier (const Char *maskName)
 Construct from a string. More...
 
 MaskSpecifier (const String &maskName)
 
Bool useDefault () const
 Give the flag or name. More...
 
const Stringname () const
 

Private Attributes

Bool itsFlag
 
String itsName
 

Detailed Description

Class to specify which mask to use in an image.

Intended use:

Public interface

Review Status

Test programs:
tPagedImage

Synopsis

The only purpose of MaskSpecifier is to reduce the number of constructors in PagedImage. It makes it possible to specify if no mask, the default mask, or another mask should be used when opening an existing PagedImage object.

Because the constructors automatically converts from a Bool or a String, the user does not need to be aware of MaskSpecifier.

Motivation

The number of constructors in PagedImage would be many more without this class. It would need one taking a Bool and a String. Because C++ converts a const char* to Bool instead of String, a const char* would also be needed multiple times.

Definition at line 69 of file MaskSpecifier.h.

Constructor & Destructor Documentation

◆ MaskSpecifier() [1/3]

casacore::MaskSpecifier::MaskSpecifier ( Bool  useDefaultMask = True)
inline

Default constructor.

It tells if the default mask should or no mask be used.

Definition at line 74 of file MaskSpecifier.h.

◆ MaskSpecifier() [2/3]

casacore::MaskSpecifier::MaskSpecifier ( const Char maskName)
inline

Construct from a string.

It tells to use an alternative mask. An empty name means no mask.

Definition at line 82 of file MaskSpecifier.h.

◆ MaskSpecifier() [3/3]

casacore::MaskSpecifier::MaskSpecifier ( const String maskName)
inline

Definition at line 84 of file MaskSpecifier.h.

Member Function Documentation

◆ name()

const String& casacore::MaskSpecifier::name ( ) const
inline

Definition at line 92 of file MaskSpecifier.h.

References itsName.

◆ useDefault()

Bool casacore::MaskSpecifier::useDefault ( ) const
inline

Give the flag or name.

Definition at line 90 of file MaskSpecifier.h.

References itsFlag.

Member Data Documentation

◆ itsFlag

Bool casacore::MaskSpecifier::itsFlag
private

Definition at line 98 of file MaskSpecifier.h.

Referenced by useDefault().

◆ itsName

String casacore::MaskSpecifier::itsName
private

Definition at line 99 of file MaskSpecifier.h.

Referenced by name().


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