STE-Industries: utilities testing
|
#include "NumericParameterDescriptor.h"
Public Member Functions | |
NumericParameterDescriptor (const char *thisName, NUMERIC_TYPE thisMinimum, NUMERIC_TYPE thisMaximum, NUMERIC_TYPE Bitmap::CorrectionParameters::*thisParameterPointer, EXCEPTION_TYPE thisException) noexcept | |
virtual | ~NumericParameterDescriptor (void) noexcept=default |
void | Assign (const char *String, Bitmap::CorrectionParameters &Parameters) const noexcept(false) |
void | Assign (const char *String, Bitmap::CorrectionParameters &Parameters) const noexcept(false) |
void | Assign (const char *String, Bitmap::CorrectionParameters &Parameters) const noexcept(false) override |
NUMERIC_TYPE | GetMaximum (void) const noexcept |
NUMERIC_TYPE | GetMinimum (void) const noexcept |
void | PrintUsage (const Bitmap::CorrectionParameters &DefaultParameters) const noexcept(false) override |
![]() | |
const char * | GetName (void) const noexcept |
Private Member Functions | |
NumericParameterDescriptor (const NumericParameterDescriptor &Descriptor) noexcept=delete | |
NumericParameterDescriptor (NumericParameterDescriptor &&Descriptor) noexcept=delete | |
void | operator= (const NumericParameterDescriptor &Descriptor) noexcept=delete |
void | operator= (NumericParameterDescriptor &&Descriptor) noexcept=delete |
const char * | UsageFormat |
Template specialization valid when NUMERIC_TYPE is float. More... | |
const char * | UsageFormat |
Template specialization valid when NUMERIC_TYPE is unsigned int. More... | |
Private Attributes | |
EXCEPTION_TYPE | ExceptionKind |
NUMERIC_TYPE | Maximum |
NUMERIC_TYPE | Minimum |
NUMERIC_TYPE Bitmap::CorrectionParameters::* | ParameterPointer |
Static Private Attributes | |
static const char * | UsageFormat |
Additional Inherited Members | |
![]() | |
static constexpr char | EQUAL_CHARACTER = '=' |
![]() | |
ParameterDescriptor (const char *thisName) noexcept | |
virtual | ~ParameterDescriptor (void) noexcept |
The NumericParameterDescriptor class template represents the descriptor of a command line parameter with integer value.
NUMERIC_TYPE | The type of the parameter; it must be either uint_fast32_t or float. |
EXCEPTION_TYPE | The type of the exception generated if a string to be converted is not composed only of digits or if it represents a number less than Minimum or greater than Maximum. It must be a predefined or enumerated type. |
Definition at line 41 of file NumericParameterDescriptor.h.
|
privatedeletenoexcept |
|
privatedeletenoexcept |
|
inlinenoexcept |
thisName | Pointer to the string containing the name of the parameter. |
thisMinimum | Minimum value for the parameter. |
thisMaximum | Maximum value for the parameter. |
thisParameterPointer | Member pointer to the parameter within the CorrectionParameter struct. |
thisException | The kind of exception that is generated if a string to be converted is not composed only of digits or if it represents a number less than Minimum or greater than Maximum. |
None. |
Definition at line 45 of file NumericParameterDescriptor.tpl.
|
virtualdefaultnoexcept |
|
virtualnoexcept |
String | Pointer to the string containing the value of the parameter. |
Parameters | Reference to the CorrectionParameter struct to modify with the new value. |
FloatException::ExceptionKind | If String does not begin with an equal sign or the rest does not contain a valid real number without leading sign or extra characters. |
Reimplemented from GraphicSpace::ParameterDescriptor.
Definition at line 63 of file FloatParameterDescriptor.cpp.
References END_STRING.
|
virtualnoexcept |
String | Pointer to the string containing the value of the parameter. |
Parameters | Reference to the CorrectionParameter struct to modify with the new value. |
IntegerException::ExceptionKind | If String does not begin with an equal sign or the rest is not composed only of digits or if it represents a number less than Minimum or greater than Maximum. |
Reimplemented from GraphicSpace::ParameterDescriptor.
Definition at line 66 of file IntegerParameterDescriptor.cpp.
References DECIMAL_BASE, and END_STRING.
|
overridevirtualnoexcept |
Reimplemented from GraphicSpace::ParameterDescriptor.
|
inlinenoexcept |
None. |
Definition at line 84 of file NumericParameterDescriptor.tpl.
|
inlinenoexcept |
None. |
Definition at line 67 of file NumericParameterDescriptor.tpl.
|
privatedeletenoexcept |
|
privatedeletenoexcept |
|
inlineoverridevirtualnoexcept |
DefaultParameters | Reference to the CorrectionParameter struct which contains the default parameters. |
FileExceptionType::FILE_WRITE_ERROR | If an error occurs while writing the string. |
Reimplemented from GraphicSpace::ParameterDescriptor.
Definition at line 111 of file NumericParameterDescriptor.tpl.
References DefaultParameters, GraphicSpace::FILE_WRITE_ERROR, and STANDARD_OUTPUT.
|
private |
Template specialization valid when NUMERIC_TYPE is float.
Definition at line 30 of file FloatParameterDescriptor.cpp.
|
private |
Template specialization valid when NUMERIC_TYPE is unsigned int.
Definition at line 30 of file IntegerParameterDescriptor.cpp.
|
private |
The kind of exception that is generated if a string to be converted is not composed only of digits or if it represents a number less than Minimum or greater than Maximum.
Definition at line 63 of file NumericParameterDescriptor.h.
|
private |
Maximum valid value of the parameter.
Definition at line 52 of file NumericParameterDescriptor.h.
|
private |
Minimum valid value of the parameter.
Definition at line 48 of file NumericParameterDescriptor.h.
|
private |
Member pointer to the parameter within the CorrectionParameter struct.
Definition at line 57 of file NumericParameterDescriptor.h.
|
staticprivate |
Format string used to write the usage message related to a numeric parameter.
Definition at line 68 of file NumericParameterDescriptor.h.