Class ACommandLineIntegerRange
Unit
linearc
Declaration
type ACommandLineIntegerRange = class(ACommandLineNumber)
Description
This class represents an option that expects an integer 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: int64; 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: int64; virtual; |
|
function setMinimum(const newMinimum: int64): int64; virtual; |
|
function maximum: int64; virtual; |
|
function setMaximum(const newMaximum: int64): int64; virtual; |
Description
Fields
|
myMinimumValue: int64; |
Stores the minimum acceptable value
|
|
myMaximumValue: int64; |
Stores the maximum acceptable value
|
Methods
|
constructor named(const thisName: string; const isRequired: boolean; const isRest: boolean; const thisDefaultValue: Variant; const thisMinimumValue, thisMaximumValue: int64; 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 clirAcceptedValuesDescription.
|
Generated by PasDoc 0.13.0 on 2015-06-25 11:07:51
|