Class ACommandLineFloatRange
Unit
linearc
Declaration
type ACommandLineFloatRange = class(ACommandLineNumber)
Description
This class represents an option that expects a floating-point value which falls between a predefined minimum and maximum. If the user attempts to set a value that is outside the prescribed range of values, an error is returned to them.
Hierarchy
Overview
Fields
Methods
|
constructor named(const thisName: string; const isRequired: boolean; const isRest: boolean; const thisDefaultValue: Variant; const thisMinimumValue, thisMaximumValue: double; const thisDescription: string; const thisValueDescription: string = ''; const onOptionDirtied: AnOptionDirtiedHandler = nil); reintroduce; virtual; |
|
function init: boolean; override; |
|
function usageString: AnsiString; override; |
|
function shallowCopyFrom(const Other: AnObject): boolean; override; |
|
function setValue(const newValue: Variant; const makeDirty: boolean = true): Variant; override; |
|
function minimum: double; virtual; |
|
function setMinimum(const newMinimum: double): double; virtual; |
|
function maximum: double; virtual; |
|
function setMaximum(const newMaximum: double): double; virtual; |
Description
Fields
|
myMinimumValue: double; |
Stores the minimum acceptable value
|
|
myMaximumValue: double; |
Stores the maximum acceptable value
|
Methods
|
constructor named(const thisName: string; const isRequired: boolean; const isRest: boolean; const thisDefaultValue: Variant; const thisMinimumValue, thisMaximumValue: double; const thisDescription: string; const thisValueDescription: string = ''; const onOptionDirtied: AnOptionDirtiedHandler = nil); reintroduce; virtual; |
Construct a new command-line option with the specified name.
This method constructs a new instance of ACommandLineOption with the specified defaultValue , minimumValue , and maximumValue . The caller can also set whether the option is required, and can provide a description of the option which will be used when the user requests help.
|
|
function init: boolean; override; |
Initializer
|
|
function usageString: AnsiString; override; |
Construct and return a string representation of the option, suitable for output to a text-based device, such as a console.
This method builds upon the behavior inherited from ACommandLineOption.usageString: it calls that routine first, then appends a string that indicates the minimum and maximum values for the range. The format of the appended string is controlled by clfrAcceptedValuesDescription.
|
Generated by PasDoc 0.13.0 on 2015-06-25 11:07:51
|