Interface CanPrint
Unit
classwork
Declaration
type CanPrint = interface(IInterface)
Description
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.
This interface is useful for producing debugging output.
Hierarchy
Overview
Methods
Description
Methods
|
function toString: AnsiString; |
Construct and return a string representation of the object and its data.
|
|
function printTo(const Dest: ATextOutputStream; prefix: AnsiString = ''; suffix: AnsiString = ''): TStreamIOSize; |
Print a string representation of the class and its data to the specified stream. If prefix or suffix are provided, these are printed before and after the string representation, respectively.
prefix and suffix are defined to allow the caller to refine how the information is printed; for instance, the caller could specify lineEnding for suffix to cause a newline to be printed after the instance representation. When called on a class that calls this method recursively, this will ensure that the printed output is still easy to read.
Classes that incorporate or manage instances of other classes (such as ABinaryTree) may print not only their own representations, but those of the classes that they manage.
Returns
The total number of bytes printed to Dest . |
Generated by PasDoc 0.13.0 on 2015-06-23 19:40:11
|