Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Enumerations
Variables
Constants
Functions and Procedures
Identifiers

Class TkdRange

Unit

kdranges

Declaration

type TkdRange = class(TkdResource)

Description

Resource class TkdRange is the ancestor for all components modelling different address ranges which are either directly accessible through a virtual address assigned to a user process (descendants of TkdDirectMemoryRange class) or circumstantially accessible - by means of a proper remapping (TkdMemoryRange descendant of TkdHWRange class) or even port ranges. Whatever the case, the class encapsulates the fundamental behavior common to all ranges and introduces methods that can be overridden to examine the validity of bounds of the address range and reimplement the viewable representation of some published information concerned to the address range comprehension.

Hierarchy

TkdResource

Methods

Overview

Protectedclass procedure CheckAddressValidity (Value: String); virtual; abstract;
Protectedprocedure CheckRangeDiapason (ARangeFrom, ARangeTo: LongWord);
Protectedprocedure CheckRangeFrom (Value: String); virtual;
Protectedprocedure CheckRangeTo (Value: String); virtual;
Protectedfunction GetRangeWidth (RngFrom, RngTo: LongWord): LongWord;

Description

Protectedclass procedure CheckAddressValidity (Value: String); virtual; abstract;

CheckAddressValidity class method has to be overridden in all descendants to raise the corresponding exception if Value argument is out of proper bounds of the address range. The bounds of the address range of targeted class are implicitly specified.

Protectedprocedure CheckRangeDiapason (ARangeFrom, ARangeTo: LongWord);

CheckRangeDiapason method checks if the low bound of the address range is always equal or less than the upper bound. If not, the corresponding exception invalid_range is raised.

Protectedprocedure CheckRangeFrom (Value: String); virtual;

CheckRangeFrom method checks if the low bound of the address range is valid. The method is introduced as a couple of consequent calls to CheckAddressValidity and CheckRangeDiapason methods. All immediate descendants override this method by calling this inherited method before their own additional verifications.

Protectedprocedure CheckRangeTo (Value: String); virtual;

CheckRangeTo method checks if the upper bound of the address range is valid. The method is introduced as a couple of consequent calls to CheckAddressValidity and CheckRangeDiapason methods. All immediate descendants override this method by calling this inherited method before their own additional verifications.

Protectedfunction GetRangeWidth (RngFrom, RngTo: LongWord): LongWord;

GetRangeWidth method returns the width of an address range whose bounds are given.

Properties

Overview

Protectedproperty RangeFrom: String;
Protectedproperty RangeTo: String;

Description

Protectedproperty RangeFrom: String;

RangeFrom property specifies the low bound of the address range.

Protectedproperty RangeTo: String;

RangeTo property specifies the upper bound of the address range.