Unit classwork

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

This unit defines several classes to handle:

All of this functionality routinely serves as the basis for my projects, and so I have now condensed what were several units into one for increased portability between projects.

Overview

Classes, Interfaces, Objects and Records

Name Description
Class AnObject This class extends TObject to provide some additional functionality reminiscent of that provided by the base Object class in Objective C.
Class AnIterator This class represents an abstract iterator.
Interface CanIterate This iterface declares the methods that must be implemented by any class that supports iteration over its data.
Class AStream The base stream type.
Interface CanStream This interface declares the methods that must be implemented by any class that is capable of streaming its data.
Class AStreamIterator This class can be used to iterate over the data in a stream.
Class AStreamWrapper This class represents a wrapper around an instance of AStream; that is, it defines the basis for a class which can manipulate and extend the capabilities of an arbitrary stream by acting as a stream itself.
Class ATextInputStream This class serves as the basis for a class which wraps around other instances of AStream and provides the ability to treat the data read from the stream as text.
Class ATextOutputStream This class serves as the basis for a class which wraps around other instances of AStream and provides the ability to treat the data to be written to the stream as text.
Interface CanPrint This interface will be adopted by all classes that are able to produce string representations of themselves and their data, and which can also print those representations to an arbitrary stream.
Class Charstring This class acts as a repository for some string functions that are used by various classes.
Class APrintingObject An object that can produce and stream a string representation of itself.
Class AnException A basic exception.
Class ABufferedStream This class serves as the basis for a pair of classes that wrap around other streams and provide buffered input and output of those streams.
Class ABufferedInputStream This class wraps around an input stream and buffers input from that stream.
Class ABufferedOutputStream This class wraps around an output stream and buffers output to that stream.
Class ABufferedStreamError This class represents an error that may occur when attempting to allocate the buffer for a buffered stream.
Class AFileStream A file stream.
Class AFileInputStream This class can be used for binary input from a file that can be accessed by the underlying file system.
Class AFileOutputStream This class can be used for binary output to any file that is accessible to the underlying file system.
Class AFileStreamOpenError An instance of this exception class is raised if the constructor for AFileInputStream fails to open the specified file for reading, or if the constructor for AFileOutputStream fails to open the specified file for writing.
Class AFileStreamReadError An instance of this exception class is raised if AFileInputStream.read fails to retrieve data from the underlying file.
Class AFileStreamWriteError An instance of this exception class is raised if AFileOutputStream.write fails to write data to the underlying file.
Class AStandardOutputStream This class allows access to stdout as though it was a file stream.
Class AStandardInputStream This class allows access to stdin as though it was a file stream.
Class AStandardErrorStream This class allows access to stderr as though it was a file stream.
Class AConsoleOutputStream This class can be used to wrap around an instance of AStandardOutputStream or one of its descendants so that ASCII and UTF-8 encoded text can be written to the stream.
Class AConsoleInputStream This class can be used to wrap around an instance of AStandardInputStream or any of its descendants so that ASCII and UTF-8 encoded text can be read from the stream.
Class AStringStream This class allows an AnsiString to be read from and written to as though it was a stream.
Class ANode This class represents a single object in a hierarchical linked list.
Class AVector This class represents a vector, which is a dynamically-allocated one-dimensional array that contains elements which are all the same size.
Class AVectorError An instance of this exception class is raised whenever there is a fatal error within an instance of AVector.
Class AVectorAllocationError An instance of this exception class is raised when allocating memory for the buffer fails in a call to AVector.allocateElements.
Class APointerVector This class represents a vector of pointers.
Class AnObjectVector This class represents an array that contains references to objects: descendants of AnObject.
Class ABinaryLeaf This class represents a node in a binary tree.
Class ABinaryTree This class represents a basic binary tree which contains nodes that are sorted by an integer key.
Class ABinaryTreeDictionary This class represents a "dictionary" of binary trees, which is simply a binary tree of binary trees.
Class ABinaryTreeIterator Instances of this class can be used to iterate through the nodes in ABinaryTree and its descendants, starting with the root node and proceeding toward ABinaryTree.YoungestNode.
Class AStringLeaf This class represents a node in a binary tree that keeps the string used to define its sort key.
Class AStringTree This class represents a binary tree that is comprised of instances of AStringLeaf.
Class ALinkedList This class represents a doubly-linked list of nodes.
Class AStringListItem This class represents a single entry in AStringList.
Class AStringList This class represents a list of one or more strings.
Class AVariantListItem This class represents a single item in a linked-list of items.
Class AVariantList This class represents a list of one or more variant values.
Class AMappingEntry This class represents a mapping entry, which is an item that is indexed by a string key and which maps that key to a value.
Class AMapping This class represents a mappings, which is a list of items that are indexed by a string key.
Class ADictionaryEntry This class represents a dictionary entry, which is an item that is indexed by a string key.
Class ADictionary This class represents a dictionary, which is a list of items that are indexed by a string key.
Class AStreamBookmark This class represents a stream bookmark, which is a way of associating a name with a specific location in a stream.
Class AStreamBookmarkSpan This class represents a string bookmark that specifies a span: that is, a block of bytes within a stream.
Class AStreamBookmarkDictionary This class represents a dictionary of stream bookmarks, which is a collection of instances of AStreamBookmark.
Class ABookmarkedStream This class represents a bookmarked stream, which is a stream that is capable of saving and reading its own list of bookmarks.
Class ABookmarkedOutputStream This class represents a stream that is capable of recording bookmarks to a dictionary of bookmarks and then writing that dictionary to itself at a given position.
Class ABookmarkedInputStream This class represents a stream that is capable of reading a dictionary of bookmarks from itself.
Class ACounter This class represents a single named counter.
Class ACounterOverageError An instance of this exception class is raised by ACounter.increment if all of the following are true: ACounter.limit has a value that is not zero, that value is exceeded by a call to ACounter.increment, and ACounter.notifyOnExcess is True.
Class ACounterList This class is used by ALog and its descendants to manage a list of named counters: one for each type of message that can be logged.
Class ALoggedItem This class represents a basic item that can be logged to an instance of ALog.
Class ALoggedNote This class represents a simple note that is logged.
Class ALoggedHint This class represents a hint that is logged.
Class ALoggedWarning This class represents a warning that is logged.
Class ALoggedError This class represents a error that is logged.
Class ALoggedFatalError This class represents a hint that is logged.
Class ALog This class represents a generic log, which can be used to output status and error messages to an assigned stream.
Class AFileLog This class represents a log that will log to a file stream.
Class AConsoleLog This class represents a log that will log to either stdout or stderr.
Class ABufferedLog This class represents a log that will log to a string stream.
Class ALoggingObject This class represents a generic object that is capable of logging items to a given log.
Class MemorySpan This is a utility class that provides some helpful routines for quickly filling and copying stretches of memory.
Class AFileVersionInfoResource This class represents version information that is stored as a resource inside of an object file which represents the main executable of the current process.
record TVSFixedFileInfo This structure defines the items in the version resource which are fixed: that is, their sizes and locations within the resource are predefined.
record TTypicalVersionInfoHeader These elements exist at the beginning of every pseudo-structure.
Class AnELFFileVersionInfoResource This class represents version information that is stored as a resource within the ELF object file that represents main code segment of the current process.
Class AnApplication This class represents a single process (an application) in an object-oriented fashion.
Class AConsoleApplication This class represents a single process running as a console application: a program that uses a terminal or console for standard input and output.

Functions and Procedures

function ioMessage(const ioCode: longword): string;
function TVarRecToVariant(const value: TVarRec): Variant;

Types

ABinaryLeafPointer = ˆABinaryLeaf;
AnObjectClass = class of AnObject;
ANodeClass = class of ANode;
PTypicalVersionInfoHeader = ˆTTypicalVersionInfoHeader;
PVSFixedFileInfo = ˆTVSFixedFileInfo;
TCensus = longword;
TNodeAbsoluteIndex = longword;
TNodeRelativeIndex = longint;
TSortKey = int64;
TStreamBookmarkType = longword;
TStreamChecksum = int64;
TStreamIOSize = longword;
TStreamLength = int64;
TStreamOffset = int64;

Constants

bfstDefaultBufferSize = 4 * 1024;
bfstErrorAllocatingBuffer = 'failed to allocate the %d bytes needed to ' + 'buffer data for %s';
bnlfStringRepresentation = '[%d]: %d';
bntrDefaultNodePrintingPrefix = #9;
bntrDefaultNodePrintingSuffix = lineEnding;
bntrDefaultPrintingSuffix = lineEnding;
bntrStringRepresentationPlural = '%s that contains %d nodes';
bntrStringRepresentationSingular = '%s that contains %d node';
charsBeginQuoteCharacter = '"';
charsDigits = '0123456789';
charsEndQuoteCharacter = '"';
charsLowercaseLetters = 'abcdefghijklmnopqrstuvwxyz';
charsUppercaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
cntrErrorLimitReached = 'the number of %s exceeds the limit of %d';
cntrStringRepresentation = '%s: %d';
ctlsDefaultPrintingPrefix = #9;
ctlsDefaultPrintingSuffix = lineEnding;
ctlsPrintedSummaryHeader = 'Total number of' + lineEnding;
errDefaultMessage = 'an error has occurred';
errStringRepresentation = '%s' + lineEnding;
errStringRepresentationWithCode = '(%d): %s' + lineEnding;
fserrInvalidFileName = 'an invalid file name was provided to the stream ' + 'handler';
fserrOpenRead = 'failed to open "%s" for reading because %s';
fserrOpenWrite = 'failed to open "%s" for writing because %s';
fserrReading = 'failed to read from "%s" because %s';
fserrWriting = 'failed to write to "%s" because %s';
ioAccessDenied = 'access to the file was denied';
ioDataCheckFailed = 'the data integrity check failed';
ioDriveNotFound = 'the specified drive was not found';
ioDriveProtected = 'the drive is protected against writes';
ioDriveReadFailure = 'the drive could not be read';
ioDriveUnavailable = 'the drive is temporarily unable to handle the request';
ioDriveWriteFailure = 'writing to the drive failed';
ioFileNotFound = 'the specified file was not found';
ioFileNotOpen = 'the file must first be opened';
ioHardwareFailure = 'a hardware failure occurred';
ioIncorrectMedia = 'incorrect media is loaded in the drive';
ioInvalidDrive = 'the drive specified is invalid';
ioInvalidHandle = 'an invalid file handle was specified';
ioInvalidNumber = 'an invalid number was encountered';
ioInvalidOperation = 'an invalid operation was attempted';
ioNoFileHandle = 'a handle must first be assigned to the file';
ioPathNotFound = 'the specified path was not found';
ioPrinterPaper = 'the printer is out of paper';
ioReadError = 'reading from the device failed';
ioReadOnly = 'the file was opened for reading only';
ioRemovingDirectory = 'the current directory could not be removed';
ioRenamingFailed = 'the specified file could not be renamed';
ioSectorNotFound = 'the appropriate sector on disk was not found';
ioSeekFailure = 'the proper location on disk was not found';
ioSuccess = 'the operation was successful';
ioTooManyFiles = 'there are already too many open files';
ioUnknown = 'an unknown I/O error occurred';
ioUnknownCommand = 'the command is unrecognized';
ioUnknownDevice = 'the specified device is unknown';
ioWriteError = 'writing to the device failed';
ioWriteOnly = 'the file was opened for writing only';
lgerCounterName = 'errors';
lgerStringRepresentation = 'error: %s';
lgfeCounterName = 'fatal errors';
lgfeStringRepresentation = 'fatal: %s';
lghtCounterName = 'hints';
lghtStringRepresentation = 'hint: %s';
lgitCounterName = 'messages';
lgntCounterName = 'notes';
lgntStringRepresentation = 'note: %s';
lgwrCounterName = 'warnings';
lgwrStringRepresentation = 'warning: %s';
llstDefaultDelimiter = ',';
llstDefaultNodePrintingPrefix = #9;
llstDefaultNodePrintingSuffix = lineEnding;
llstDelimiterTabbedColumn = lineEnding + #9;
llstStringRepresentationPlural = '%s that contains %d nodes';
llstStringRepresentationSingular = '%s that contains %d node';
mapDefaultDelimiter = '=';
nodeStringRepresentationPlural = '%s with %d children';
nodeStringRepresentationSingular = '%s with %d child';
objErrorInitializing = 'failed to create and initialize an instance of "%s"';
sbspStringRepresentationPlural = '%s => from %d to %d (%d bytes)';
sbspStringRepresentationSingular = '%s => from %d to %d (%d byte)';
SBTYPE_BOOKMARK = 1;
SBTYPE_SPAN = 2;
stbmStringRepresentation = '%s => %d';
stlfStringRepresentation = '[%d]: "%s"';
striDefaultSize = sizeof(int64);
tosDefaultLineLength = 79;
tosWrapDefaultBreakCharacters: array[0..2] of string = ( ' ', '-', System.lineEnding);
tosWrapDefaultPadCharacter = ' ';
vctrErrorAllocatingMemory = 'failed to allocate %d bytes to hold elements ' + 'of %s';
vctrStringRepresentationPlural = '%s that contains %d items';
vctrStringRepresentationSingular = '%s that contains %d item';
vinfComments = 'Comments';
vinfCompanyName = 'CompanyName';
vinfFileDescription = 'FileDescription';
vinfFileVersion = 'FileVersion';
vinfInternalName = 'InternalName';
vinfLegalCopyright = 'LegalCopyright';
vinfLegalTrademarks = 'LegalTrademarks';
vinfOriginalFilename = 'OriginalFileName';
vinfPrivateBuild = 'PrivateBuild';
vinfProductName = 'ProductName';
vinfProductVersion = 'ProductVersion';
vinfSpecialBuild = 'SpecialBuild';
vsStringFileInfoKey: WideString = 'StringFileInfo';
vsVersionInfoKey: WideString = 'VS_VERSION_INFO';
VS_PADDING_ALIGNMENT = sizeof(longword);
VS_PADDING_INCREMENT = sizeof(word);

Description

Functions and Procedures

function ioMessage(const ioCode: longword): string;

Returns an error message string for the specified i/o result code

function TVarRecToVariant(const value: TVarRec): Variant;

This function converts the value in value to a Variant.

This function converts value as follows:

  • If value.vtype is vtBoolean, the resulting variant is cast as a WordBool.

  • If value.vtype is vtInteger, the resulting variant is cast as a longint.

  • If value.vtype is vtInt64, the resulting variant is cast as a int64.

  • If value.vtype is vtQWord, the resulting variant is cast as a qword.

  • If value.vtype is vtExtended, the resulting variant is cast as a double, with some potential loss of precision, since Variants cannot store extended values.

  • If value.vtype is vtCurrency, the resulting variant is cast as a currency type.

  • If value.vtype is vtChar, vtWideChar, vtString, vtPChar, vtPWideChar, vtAnsiString, vtWideString, or vtUnicodeString, the resulting variant is cast as an AnsiString.

  • If value.vtype is vtObject, vtClass, or vtInterface, the resulting variant is cast as a pointer.

  • If value.vtype is vtVariant, the resulting variant is set to the value of value.vVariant.

In all other cases, the resulting variant is set to Variants.Null.

Types

ABinaryLeafPointer = ˆABinaryLeaf;

This type is used to find and indicate the position at which a new node should be inserted into the tree.

AnObjectClass = class of AnObject;

This definition simplifies the implementation of AnObjectVector, since it allows the base implementation of AnObjectVector to construct instances of a given object on the fly (such as when AnObjectVector.readFrom is called.

ANodeClass = class of ANode;

This declaration simplifies the implementation of ABinaryTree, ALinkedList and their descendants, which all contain and operate on descendants of ANode.

PTypicalVersionInfoHeader = ˆTTypicalVersionInfoHeader;

This type points to an instance of TTypicalVersionInfoHeader.

PVSFixedFileInfo = ˆTVSFixedFileInfo;

This type points to an instance of TVSFixedFileInfo.

TCensus = longword;

This type is used to represent a census, which is a way of storing the count of nodes within a list of nodes.

This type is defined to make code flexible and easy to change.

TNodeAbsoluteIndex = longword;

This type is used to represent an absolute index, which is a way of referring to the position of a node within a sequence of nodes, relative to the beginning of the sequence. The index is zero-based, with the first node in the sequence always positioned at index zero (0).

This type is defined to make code flexible and easy to change.

TNodeRelativeIndex = longint;

This type is used to represent a relative index, which is a way of referring to the position of a node within a sequence of nodes, relative to a specific node. Values that are less than zero refer to a node which occurs prior to the node in question, while values that are greater than zero refer to a node which occurs after the node in question. Values of zero (0) refer to the node in question.

This type is defined to make code flexible and easy to change.

TSortKey = int64;

This type is used to represent a sort key, which is used to arrange items in a binary tree or list. It is defined to make code flexible and easy to change or update.

TStreamBookmarkType = longword;

This type is defined for convenience and portability; it represents a code that indicates the type of a bookmark stored in a stream. The value assigned to an instance of this type is used to ensure the correct instance of AStreamBookmark or one of its descendants is constructed to manage the bookmark when it is read from the stream.

TStreamChecksum = int64;

The type of value used when calculating a checksum for a stream. This type is declared to increase the flexibility of stream code.

TStreamIOSize = longword;

The type of value used to indicate the size of data to read or write from the stream. This type is declared to increase the flexibility of stream code.

TStreamLength = int64;

The type of value used to indicate the overall size of a stream. This type is declared to increase the flexibility of stream code.

TStreamOffset = int64;

The type of value used to indicate an offset within a stream. This type is declared to increase the flexibility of stream code.

Constants

bfstDefaultBufferSize = 4 * 1024;

This constant defines the default size, in bytes, for buffers used by instances of ABufferedStream. The default value is 4,096 bytes (4K). Buffers are allocated on the heap.

bfstErrorAllocatingBuffer = 'failed to allocate the %d bytes needed to ' + 'buffer data for %s';

This string contains the error message used when ABufferedStream.around fails to allocate a buffer to use in buffering input from or output to a stream.

The integer placeholder is filled with the desired size, in bytes, of the buffer that was to be allocated. This value may be passed to the constructor; if it is omitted, then default value specified by bfstDefaultBufferSize is used.

The string placeholder is filled with the name of the class, as returned by a call to AnObject.name.

bnlfStringRepresentation = '[%d]: %d';

This string controls the way a representation of ABinaryLeaf is constructed by ABinaryLeaf.toString.

The two integer placeholders will be filled by the index and sort keys of the node, respectively, as returned by calls to ABinaryLeaf.index and ABinaryLeaf.sortKey.

bntrDefaultNodePrintingPrefix = #9;

This string is used as the default prefix when ABinaryTree.printTo causes its nodes to be printed to a stream. It is, by default, a tab character, which ensures that the printed descriptions of the tree's nodes are indented below the printed description of the tree itself.

bntrDefaultNodePrintingSuffix = lineEnding;

This string is used as the default suffix when ABinaryTree.printTo causes its nodes to be printed to a stream. It is, by default, the value of System.lineEnding, which ensures that the printed description of each node occupies its own line.

bntrDefaultPrintingSuffix = lineEnding;

This string is used as the default suffix when ABinaryTree.printTo prints a description of the tree to a given stream. It is, by default, the value of System.lineEnding, which ensures that the printed description of the tree occupies a line by itself. When used in conjunction with bntrDefaultNodePrintingPrefix and bntrDefaultNodePrintingSuffix, this ensures that the printed description of each node is indented on its own line beneath the printed description of the tree.

bntrStringRepresentationPlural = '%s that contains %d nodes';

This string controls the way a representation of ABinaryTree is constructed by ABinaryTree.toString when the tree does not have exactly one node.

The string placeholder will be filled with the display name of the class, as returned by a call to ABinaryTree.displayName. The integer placeholder will be filled by the value of ABinaryTree.census.

bntrStringRepresentationSingular = '%s that contains %d node';

This string controls the way a representation of ABinaryTree is constructed by ABinaryTree.toString when the tree has exactly one node.

The string placeholder will be filled with the display name of the class, as returned by a call to ABinaryTree.displayName. The integer placeholder will be filled by the value of ABinaryTree.census, which will always be one (1) when this string is used.

charsBeginQuoteCharacter = '"';

The default opening quote character used

charsDigits = '0123456789';

Letters that are considered digits

charsEndQuoteCharacter = '"';

The default closing quote character used

charsLowercaseLetters = 'abcdefghijklmnopqrstuvwxyz';

Letters that are considered lowercase

charsUppercaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

Letters that are considered uppercase

cntrErrorLimitReached = 'the number of %s exceeds the limit of %d';

This string is used to format the error message passed to instances of ACounterOverageError when ACounter.increment raises it.

The string placeholder is filled with the name of the counter, as returned by a call to AStringLeaf.name applied to the ACounter instance. The integer placeholder is filled with the maximum value of the counter, as returned by a call to ACounter.limit.

cntrStringRepresentation = '%s: %d';

This string is used by ACounter.toString to control how a string representation of ACounter is produced.

The string placeholder is filled by the name of the counter, as returned by call to AStringLeaf.name when applied to an instance of ACounter. The integer placeholder is filled with the current value of the counter, as returned by a call to ACounter.value.

ctlsDefaultPrintingPrefix = #9;

This string is used by ACounterList.printSelfTo as the prefix passed to ACounter.printTo. It ensures that a tab character precedes the name and value of the counter, so that the name and value are indentend beneath the banner header that is specified by ctlsPrintedSummaryHeader.

ctlsDefaultPrintingSuffix = lineEnding;

This string is used by ACounterList.printSelfTo as the suffix passed to ACounter.printTo. It ensures that a newline follows the name of value of the counter, so that each counter occupies a single line of output.

ctlsPrintedSummaryHeader = 'Total number of' + lineEnding;

This string is used by ACounterList.printSelfTo as the banner header printed to the destination stream before the values of each counter in the list are printed.

errDefaultMessage = 'an error has occurred';

This string specifies the default error message that is used when no other message is passed during construction to an instance of AnException.

errStringRepresentation = '%s' + lineEnding;

This string governs the output of AnException.toString when no error code was passed to the associated exception on construction.

errStringRepresentationWithCode = '(%d): %s' + lineEnding;

This string governs the output of AnException.toString when an error code was passed to the associated exception on construction.

fserrInvalidFileName = 'an invalid file name was provided to the stream ' + 'handler';

This string is used to raise an exception in the event that the constructors for AFileInputStream or AFileOutputStream are passed an empty string as the name of a file. It is passed to the instance of AFileStreamOpenError that is raised by these constructors.

fserrOpenRead = 'failed to open "%s" for reading because %s';

This string controls the format of the message displayed when the constructor for AFileInputStream or its descendants fails to open a specified file for reading. It is passed to the instance of AFileStreamOpenError that is raised by the constructor.

The first string placeholder is filled with the name of the file as passed to the constructor. The second string placeholder will contain a string indicating what type of error occurred; this will be one of the I/O status messages, such as ioFileNotFound.

fserrOpenWrite = 'failed to open "%s" for writing because %s';

This string controls the format of the message displayed when the constructor for AFileOutputStream or its descendants fails to open a specified file for writing. It is passed to the instance of AFileStreamOpenError that is raised by the constructor.

The first string placeholder is filled with the name of the file as passed to the constructor. The second string placeholder will contain a string indicating what type of error occurred; this will be one of the I/O status messages, such as ioAccessDenied.

fserrReading = 'failed to read from "%s" because %s';

This string controls the format of the message displayed when a call to AFileInputStream.read fails for some reason. It is passed to the instance of AFileStreamReadError that is raised by the method in such cases.

The first string placeholder is filled with the name of the file being read, as obtained by a call to AFileStream.fileName. The second string placeholder is filled by a string indicating the type of error that occurred; this will be one of the I/O status messages, such as ioWriteOnly.

fserrWriting = 'failed to write to "%s" because %s';

This string controls the format of the message displayed when a call to AFileOutputStream.write fails for some reason. It is passed to the instance of AFileStreamWriteError that is raised by the method in such cases.

The first string placeholder is filled with the name of the file being read, as obtained by a call to AFileStream.fileName. The second string placeholder is filled by a string indicating the type of error that occurred; this will be one of the I/O status messages, such as ioReadOnly.

ioAccessDenied = 'access to the file was denied';
 
ioDataCheckFailed = 'the data integrity check failed';
 
ioDriveNotFound = 'the specified drive was not found';
 
ioDriveProtected = 'the drive is protected against writes';
 
ioDriveReadFailure = 'the drive could not be read';
 
ioDriveUnavailable = 'the drive is temporarily unable to handle the request';
 
ioDriveWriteFailure = 'writing to the drive failed';
 
ioFileNotFound = 'the specified file was not found';
 
ioFileNotOpen = 'the file must first be opened';
 
ioHardwareFailure = 'a hardware failure occurred';
 
ioIncorrectMedia = 'incorrect media is loaded in the drive';
 
ioInvalidDrive = 'the drive specified is invalid';
 
ioInvalidHandle = 'an invalid file handle was specified';
 
ioInvalidNumber = 'an invalid number was encountered';
 
ioInvalidOperation = 'an invalid operation was attempted';
 
ioNoFileHandle = 'a handle must first be assigned to the file';
 
ioPathNotFound = 'the specified path was not found';
 
ioPrinterPaper = 'the printer is out of paper';
 
ioReadError = 'reading from the device failed';
 
ioReadOnly = 'the file was opened for reading only';
 
ioRemovingDirectory = 'the current directory could not be removed';
 
ioRenamingFailed = 'the specified file could not be renamed';
 
ioSectorNotFound = 'the appropriate sector on disk was not found';
 
ioSeekFailure = 'the proper location on disk was not found';
 
ioSuccess = 'the operation was successful';

I/O status messages

ioTooManyFiles = 'there are already too many open files';
 
ioUnknown = 'an unknown I/O error occurred';
 
ioUnknownCommand = 'the command is unrecognized';
 
ioUnknownDevice = 'the specified device is unknown';
 
ioWriteError = 'writing to the device failed';
 
ioWriteOnly = 'the file was opened for writing only';
 
lgerCounterName = 'errors';

This string is used as the default name for the counter to be incremented when instances of ALoggedError are logged.

lgerStringRepresentation = 'error: %s';

This string controls the way an instance of ALoggedError is represented as a string by ALoggedError.toString.

The string placeholder is filled with the message associated with the note, as returned by a call to AnException.message when applied to the instance of ALoggedError.

lgfeCounterName = 'fatal errors';

This string is used as the default name for the counter to be incremented when instances of ALoggedFatalError are logged.

lgfeStringRepresentation = 'fatal: %s';

This string controls the way an instance of ALoggedFatalError is represented as a string by ALoggedFatalError.toString.

The string placeholder is filled with the message associated with the note, as returned by a call to AnException.message when applied to the instance of ALoggedFatalError.

lghtCounterName = 'hints';

This string is used as the default name for the counter to be incremented when instances of ALoggedHint are logged.

lghtStringRepresentation = 'hint: %s';

This string controls the way an instance of ALoggedHint is represented as a string by ALoggedHint.toString.

The string placeholder is filled with the message associated with the note, as returned by a call to AnException.message when applied to the instance of ALoggedHint.

lgitCounterName = 'messages';

This string is used as the default name for the counter to be incremented when instances of ALoggedItem are logged.

lgntCounterName = 'notes';

This string is used as the default name for the counter to be incremented when instances of ALoggedNote are logged.

lgntStringRepresentation = 'note: %s';

This string controls the way an instance of ALoggedNote is represented as a string by ALoggedNote.toString.

The string placeholder is filled with the message associated with the note, as returned by a call to AnException.message when applied to the instance of ALoggedNote.

lgwrCounterName = 'warnings';

This string is used as the default name for the counter to be incremented when instances of ALoggedWarning are logged.

lgwrStringRepresentation = 'warning: %s';

This string controls the way an instance of ALoggedWarning is represented as a string by ALoggedWarning.toString.

The string placeholder is filled with the message associated with the note, as returned by a call to AnException.message when applied to the instance of ALoggedWarning.

llstDefaultDelimiter = ',';

This string is used as the default delimiter by ALinkedList.explode and ALinkedList.implode when no other delimiter is supplied.

llstDefaultNodePrintingPrefix = #9;

This string is used by ALinkedList.printTo. It serves as the preffix passed when the nodes in the list are to be printed to a given stream by means of ANode.printTo.

The default value is a tab character, which ensures that each list item is indented below the description of the list itself.

llstDefaultNodePrintingSuffix = lineEnding;

This string is used by ALinkedList.printTo. It serves as the suffix passed when the nodes in the list are to be printed to a given stream by means of ANode.printTo.

The default value is the same as System.lineEnding, ensuring that each list item occupies a line of its own.

llstDelimiterTabbedColumn = lineEnding + #9;

This string can be passed to ALinkedList.implode to cause its output to be formatted into a single column composed of many rows instead of a lengthy string.

This string is defined for convenience and is not used by default.

llstStringRepresentationPlural = '%s that contains %d nodes';

This string controls how a string representation of ALinkedList is constructed by ALinkedList.toString. It is used when the list does not have exactly one node (it either has no nodes, or has more than one node).

The string placeholder is filled with the display name of the class, as obtained by a call to APrintingObject.displayName. The integer placeholder will be filled with the value of ALinkedList.census.

llstStringRepresentationSingular = '%s that contains %d node';

This string controls how a string representation of ALinkedList is constructed by ALinkedList.toString. It is used when the list has exactly one node.

The string placeholder is filled with the display name of the class, as obtained by a call to APrintingObject.displayName. The integer placeholder will be filled with the value of ALinkedList.census, which will always be one (1) when this string is used.

mapDefaultDelimiter = '=';

This string is used as the default key/value pair delimiter when none is provided to AMapping.implode, AMapping.explode, AMappingEntry.fromDelimitedString, and AMappingEntry.implode.

nodeStringRepresentationPlural = '%s with %d children';

Specifies the format to use when creating a string representation of ANode that does not have one immediate child (it has either none or more than one child). This format string is used by ANode.toString.

The string placeholder will be filled with the name of the class as returned by a call to APrintingObject.displayName. The integer placeholder will be filled with the number of immediate children of the node, as returned by a call to ANode.census.

nodeStringRepresentationSingular = '%s with %d child';

Specifies the format to use when creating a string representation of ANode that has only one immediate child. This format string is used by ANode.toString.

The string placeholder will be filled with the name of the class as returned by a call to APrintingObject.displayName. The integer placeholder will be filled with the number of immediate children of the node, which will always be one (1) when this format string is used.

objErrorInitializing = 'failed to create and initialize an instance of "%s"';

This is the format of the error message passed to the exception raised when AnObject.init returns False.

The string placeholder will be filled by the name of the class that raised the exception, as returned by a call to TObject.className.

sbspStringRepresentationPlural = '%s => from %d to %d (%d bytes)';

The format specified by this string is used to construct a string representation of AStreamBookmarkSpan when AStreamBookmarkSpan.toString is called. This representation is used when AStreamBookmarkSpan.length returns any value except 1.

The string placedholder is replaced by the name of the bookmark, as returned by a call to AStreamBookmark.name.

The first integer placeholder is replaced with the position in the stream at which the span begins, as returned by a call to AStreamBookmarkSpan.position.

The second integer placeholder is replaced with the position in the stream at which the span ends, as returned by a call to AStreamBookmarkSpan.endPosition.

The third integer placeholder is replaced with the length of the span, in bytes, as returned by a call to AStreamBookmarkSpan.length.

sbspStringRepresentationSingular = '%s => from %d to %d (%d byte)';

The format specified by this string is used to construct a string representation of AStreamBookmarkSpan when AStreamBookmarkSpan.toString is called. This representation is used when AStreamBookmarkSpan.length returns a value of 1.

The string placedholder is replaced by the name of the bookmark, as returned by a call to AStreamBookmark.name.

The first integer placeholder is replaced with the position in the stream at which the span begins, as returned by a call to AStreamBookmarkSpan.position.

The second integer placeholder is replaced with the position in the stream at which the span ends, as returned by a call to AStreamBookmarkSpan.endPosition.

The third integer placeholder is replaced with the length of the span, in bytes, as returned by a call to AStreamBookmarkSpan.length.

SBTYPE_BOOKMARK = 1;

This constant represents a type of stream bookmark and can be assigned to AStreamBookmark.bookmarkType by the initializer of an instance of AStreamBookmark or one of its descendants. The value of this constant is used to ensure that the correct instance of AStreamBookmark or one of its descendants is constructed when reading bookmarks from a stream.

The value of this constant indicates that the bookmark stored in the stream is a direct instance of AStreamBookmark.

SBTYPE_SPAN = 2;

This constant represents a type of stream bookmark and can be assigned to AStreamBookmark.bookmarkType by the initializer of an instance of AStreamBookmark or one of its descendants. The value of this constant is used to ensure that the correct instance of AStreamBookmark or one of its descendants is constructed when reading bookmarks from a stream.

The value of this constant indicates that the bookmark stored in the stream is a direct instance of AStreamBookmarkSpan.

stbmStringRepresentation = '%s => %d';

The format specified by this string is used to construct a string representation of AStreamBookmark when AStreamBookmark.toString is called.

The string placeholder is replaced by the name of the bookmark, as returned by a call to AStreamBookmark.name.

The integer placeholder is replaced with the position in the stream to which the bookmark refers, as returned by a call to AStreamBookmark.position.

stlfStringRepresentation = '[%d]: "%s"';

This string controls the way a representation of AStringLeaf is constructed by AStringLeaf.toString.

The integer placeholder will be filled by the index of the node, and the string placeholder will be filled with the name of the node, as returned by a call to AStringLeaf.name.

striDefaultSize = sizeof(int64);

The default size of values read by AStreamIterator.

tosDefaultLineLength = 79;

This constant controls the maximum length of a line, in characters, that is wrapped by ATextOutputStream.printWrapped.

tosWrapDefaultBreakCharacters: array[0..2] of string = ( ' ', '-', System.lineEnding);

This array contains the default characters at which a line wrapped by ATextOutputStream.printWrapped is broken.

tosWrapDefaultPadCharacter = ' ';

This constant specifies the default padding character used by ATextOutputStream.printWrapped in order to align each line to a specific column.

vctrErrorAllocatingMemory = 'failed to allocate %d bytes to hold elements ' + 'of %s';

This string controls the format of the error message passed to an instance of AVectorAllocationError when a call to AVector.ofLength or AVector.grow fails to allocate memory for the array.

The integer placeholder is replaced with the total size of memory requested from the system, in bytes. The string placeholder is filled with the display name of the class, as obtained by a call to APrintingObject.displayName.

vctrStringRepresentationPlural = '%s that contains %d items';

This string controls the string representation created by a call to AVector.toString. This particular format is used when there are zero (0) or more than 1 (1) items in the array.

The string placeholder is filled with the display name of the class, as returned by a call to AVector.displayName. The integer placeholder is filled with the total number of elements in the managed array, as returned by a call to AVector.length.

vctrStringRepresentationSingular = '%s that contains %d item';

This string controls the string representation created by a call to AVector.toString. This particular format is used when there is exactly one item in the array.

The string placeholder is filled with the display name of the class, as returned by a call to AVector.displayName. The integer placeholder is filled with the total number of elements in the managed array, as returned by a call to AVector.length. This value will always be one (1) when this string is used.

vinfComments = 'Comments';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfCompanyName = 'CompanyName';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfFileDescription = 'FileDescription';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfFileVersion = 'FileVersion';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfInternalName = 'InternalName';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfLegalCopyright = 'LegalCopyright';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfLegalTrademarks = 'LegalTrademarks';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfOriginalFilename = 'OriginalFileName';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfPrivateBuild = 'PrivateBuild';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfProductName = 'ProductName';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfProductVersion = 'ProductVersion';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vinfSpecialBuild = 'SpecialBuild';

This value represents one of the possible keys that can be stored inside of a version information resource. It is one of several keys that, if found in the version resource, will be added – along with the corresponding value – to the dictionary specified when AFileVersionInfoResource.readInto is called.

vsStringFileInfoKey: WideString = 'StringFileInfo';

This string value is used as a key to validate the StringFileInfo pseudo-structure.

vsVersionInfoKey: WideString = 'VS_VERSION_INFO';

This string value is used as a key to validate the VS_VERSIONINFO pseudo-structure.

VS_PADDING_ALIGNMENT = sizeof(longword);

Microsoft's version pseudo-structures are aligned to 32-bit addresses.

VS_PADDING_INCREMENT = sizeof(word);

Microsoft's version pseudo-structures are alingted to 32-bit addresses by by using zero-value words.


Generated by PasDoc 0.13.0 on 2015-01-10 17:13:18