casa
5.7.0-16
|
Class to specify which mask to use in an image. 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 String & | name () const |
Private Attributes | |
Bool | itsFlag |
String | itsName |
Class to specify which mask to use in an image.
Public interface
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.
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.
Default constructor.
It tells if the default mask should or no mask be used.
Definition at line 74 of file MaskSpecifier.h.
|
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.
|
inline |
Definition at line 84 of file MaskSpecifier.h.
|
inline |
Definition at line 92 of file MaskSpecifier.h.
References itsName.
|
inline |
|
private |
Definition at line 98 of file MaskSpecifier.h.
Referenced by useDefault().
|
private |
Definition at line 99 of file MaskSpecifier.h.
Referenced by name().