Topic Path: Symbol Reference > Types > TIdStreamHelper Type
ContentsIndexHome
PreviousUpNext
TIdStreamHelper Type

Specifies the class helper for TIdStream instances in the Indy library.

File
TIdStreamHelper = TIdStreamHelperVCL;

TIdStreamHelper is an alias for the TIdStream helper class for use on the .Net platform. Class helpers are a type that - when associated with another class - introduces additional method names and properties which may be used in the context of the associated class (or its descendants). Class helpers are a way to extend a class without using inheritance. A class helper simply introduces a wider scope for the compiler to use when resolving identifiers. When you declare a class helper, you state the helper name, and the name of the class you are going to extend with the helper. You can use the class helper any place where you can legally use the extended class. The compiler's resolution scope then becomes the original class, plus the class helper. 

Class helpers provide a way to extend a class; they are used to provide language and platform RTL bindings. On the .NET platform, variants are an alias of System.Object. Variants rely on boxing and unboxing of data into an object wrapper, as well as Delphi helper classes to implement the variant-related RTL functions. 

For the .Net platform, TIdStreamHelper is an alias for the TIdStreamHelperNET class helper. For platforms supporting VCL, TIdStreamHelper is an alias for the TIdStreamHelperVCL class helper. Both classes implement the ReadBytes and the Write class methods used to perform input or output operations for a TIdStream instance using a buffer of the TIdBytes data type. 

An example of using the TIdStreamHelper alias can be found in the ReadTIdBytesFromStream and WriteTIdBytesToStream routines in IdGlobal.pas.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.