XLIB Library (C) 1997-99 A.Solovjev


This text describes fields and methods of classes which are components of
XLIB library. You as an user has access to all of them not specified as
PRIVATE or PROTECTED but some of them are not useful for you because their
destination is internal interface. Fields and methods which could be useful
for user from my view point are marked with asterisk.

================================================================================

TDField class
=============

TDField class describes the single field inside the compound structure (GROUP,
QUEUE, RECORD or CLASS). Because GROUPs can be nested, TDField class has
self-recursive nature. ALL methods are not PRIVATE or PROTECTED but they are
not for direct usage. They are using by other classes from the XLIB library.

Instances of this class and following below TDGroup class also referenced in
the text as 'fields descriptors'.


Fields
------

  UpLevel          Reference to the GROUP descriptor this field belongs to.
                   For first level fields this fields points to the GROUP,
                   QUEUE, RECORD or CLASS descriptor.

* TypeCode         The code of the field's type. Types and their codes are
                   listed in TDField.INC as ITEMIZE structure.

* DIMs             4-items array which holds field's dimensions. For fields
                   which are not arrays DIMs[1] is equal to 0.

* Info             Additional information for a field. At the moment, it
                   is used for storing of precision for fields of DECIMAL
                   and PDECIMAL types.

* UnitSize         Size of the single value of the field.

  TotalSize        Total size of the value of the field. UnitSize = TotalSize
                   if the field is anot an array.

  Offset           The offset of the field relatively the up level GROUP
                   referenced by the UpLevel field.

* Picture          Reference to CSTRING with field's picture.

  PictureOwn       The flag which is equal to TRUE if storage referenced by
                   the Picture field should be disposed.

* Name             Reference to CSTRING with field's external name (value of
                   the NAME() attribute)

  NameOwn          The flag which is equal to TRUE if storage referenced by
                   the Name field should be disposed.

* Label            Reference to CSTRING with field's label

  LabelOwn         The flag which is equal to TRUE if storage referenced by
                   the Label field should be disposed.


Methods
-------

  Construct ()
                   Constructor

  Destruct ()
                   Destructor

  SetType (BYTE _Type, UNSIGNED _Size = 0)
                   Sets type of the field. The _Type parameter should be equal
                   to valid type code. If type is STRING, CSTRING or PSTRING,
                   the second parameter should be set to size of the field.
                   The _Type parameter shouldn't be set to DECIMAL or PDECIMAL.
                   For other type codes the second parameter is ignoring.

  SetType (BYTE _Type, UNSIGNED _Size, BYTE _Precision)
                   Sets type of the field. This method is valid for DECIMAL
                   and PDECIMAL types only. The type is specifying by the _Type
                   parameter. The _Size parameter means maximal number of
                   characters in string presentation of field's value, i.e. it
                   has the same sense as in Clarion syntax for these types.
                   The _Precision field is equal to number of digits after
                   decimal point.

  SetOVER (TDField _Field)
                   Sets the field which already occupies the same memory as
                   defining field does.

  SetPicture (*CSTRING _Str, BYTE _Copy = 1)
                   Sets the picture of the field to _Str. If the _Copy
                   parameter is equal to TRUE, the method allocates a memory
                   for copy of _Str.

  SetPicture (STRING _Str)
                   Sets the picture of the field to _Str. This method always
                   allocates memory for copy of value.

  SetName (*CSTRING _Str, BYTE _Copy = 1)
                   Similar to SetPicture(*CSTRING,BYTE) method but sets the
                   field's external name.

  SetName (STRING _Str)
                   Similar to SetPicture(STRING) method but sets the field's
                   external name.

  SetLabel (*CSTRING _Str, BYTE _Copy = 1)
                   Similar to SetPicture(*CSTRING,BYTE) method but sets the
                   field's label.

  SetLabel (STRING _Str)
                   Similar to SetPicture(STRING) method but sets the field's
                   label.

  GetAttr (UNSIGNED _Offset),BYTE
                   Returns the set of bitmapped flags which describe specified
                   properties of the field:
                   - does it have an external name,
                   - does it have a label,
                   - does it have a picture,
                   - does its offset is equal to expected passed as _Offset
                     parameter, and
                   - does it's an array.
                   Values of flags are declared in TDFIELD.INC as Attr ITEMIZE
                   structure.

  Items (), UNSIGNED
                   Returns a total number items if the field is an array.
                   Returns 1 if the field is not an array.

  Shift (),UNSIGNED
                   Returns total number of nested fields. For fields which
                   are not GROUPs this method returns 1. For GROUP fields it
                   returns total number of nested fields including fields 
                   nested in nested GROUP fields.


================================================================================

TDGroup class
=============

TDGroup class is derived from TDField and extends that class with extra
property field.

Extra field
-----------

  Nested           Total number of fields nested in this GROUP. See
                   TDField.Shift() method description


Methods
-------

  Construct
                   Constructor


================================================================================

TypeDescriptor class
====================

TypeDescriptor class holds information about whole type descriptor. Its main
part is a queue of instances of TDField (or, TDGroup) class. Its destination
is to load an existent type descriptor and parse to a set of fields'
descriptors. Also, this class provides some basic edit facilities like 'add
new field' or 'delete a field'. Though these edit facilities are available
I do not recommend use them. Try to use TDWriter class for that.


Fields
------

* Q                A reference to a queue where descriptors for every field
                   are stored. Sequence of queue records corresponds to the
                   order of fields in compoumd structure declaration. The
                   reference to the TDField class instance is the only field
                   in a queue.

  Nest             Internal field which points to the current (last reached or
                   selected) GROUP field.

  Last             A reference to the last processed field descriptor.

  Calc             Internal flag which tells about necessity to recalculate
                   size of the current GROUP pointed by the Nest field and of
                   all upper levels GROUPs.

  TypeString       A reference to the unprocessed tail of the type descriptor
                   during parsing.

* Prefix           A reference to a CSTRING value of the set or calculated
                   prefix of the compound structure.


Methods
-------

  Construct ()
                   Constructor

  Destruct ()
                   Destructor

  Kill ()            
                   Cleans this instance of the TypeDescriptor class up for
                   reusage.

* Load (STRING)
                   Loads a queue of fields descriptors from the type
                   descriptor passed as a STRING value.

* Load (*BYTE)
                   Loads a queue of fields descriptors from the type
                   descriptor passed as an address of its first byte.

  Find (TDField),UNSIGNED

                   Searches passed field descriptor in Q queue. If field 
                   descriptor has been found, the function returns its index
                   in the queue. Current field of the queue remains the same
                   as it has been before searching.

* Find (STRING FieldName),UNSIGNED
                   The method returns an ordinal number of the field with
                   passed label (including prefix) inside the type descriptor.
                   Result is 0 if passed string is not recognized as field's
                   label.

  Select (<TDGroup>)
                   Sets the Nest field to the passed group descriptor. If the
                   parameter is omitted, the most outer hidden GROUP is 
                   selected.

  Insert (TypeDescriptor _Other, <TDField _After>)
                   Merges two type descriptors. The one corresponding to the
                   _Other parameter is inserting after field descriptor _After
                   if it's given or after all fields descriptors. If you
                   need to insert the _Other before all fields, set the Nest
                   to NULL. This form of insert corresponds to LIKE() field
                   declaration in Clarion syntax.

  Insert (TDField _Field, <TDField _After>)
                   Inserts given field descriptor _Field into the type
                   descriptor queue after record corresponding to the field
                   descriptor _After, if it's given, or after all fields.
                 
  Remove (TDField _Field)
                   Removes given field descriptor from the type dscriptor
                   queue.

  NestUp ()
                   Sets the Nest field to reference the upper level GROUP.

  NestDown () 
                   Sets the Nest field to reference the GROUP pointed by the
                   Last field.

  RecalcSize ()
                   Recalculates sizes for all fields descriptors in the type
                   descriptor queue.

  RecalcSize (UNSIGNED),UNSIGNED
                   Recalculates the size for the field descriptor with given
                   ordinal number. If this descriptor corresponds to a GROUP,
                   the function performs recalculation of sizes for all nested
                   fields and further recursively. Function returns an ordinal
                   number of last processed field descriptor.

  GetPrefix ()
                   Updates value of the Prefix field. It's calculating as the
                   most common prefix of all fields in the type descriptor
                   which have not empty label. The prefix should confirm the
                   rule of Clarion language that next character after prefix 
                   is colon.

  SetPrefix (STRING _Prefix)
                   Sets the prefix for the type descriptor to the passed value.
                   Calls of this function affect both fields labels and
                   external names.

  LoadGROUP (),UNSIGNED
  LoadField (UNSIGNED, UNSIGNED),UNSIGNED
  BuldField (UNSIGNED, UNSIGNED)  
  GetBYTE (),BYTE
  GetNumber (),SIGNED
  GetUNSIGNED (),UNSIGNED
  GetString (),STRING
                   Internal private methods used for parsing type descriptor.


================================================================================

TDWriter class
==============

TDWriter class provides high-level Clarion-like interface for declaration
compound structures. They could be declared at run time field by field from
the scratch or from the selected point of existent type descriptor. TDWriter
uses an instance of the TypeDescriptor class to store information about
structure being built.

Opposite to normal Clarion syntax field declaration with using of TDWriter
begins from its type. All other attributes, including field's label, should
follow type declaration.

Remember that external names of fields have more sense at run time than their
labels which are mainly valuable for the compiler.

In general, the program need the only instance of the TDWriter class per
thread.


Fields
------

* TD               Reference to the TypeDescriptor instance which holds fields
                   declarations.

  Memory           Pointer to the temporary storage used to build the type
                   descriptor on the base of information from TD.

  Ptr              An internal variable which holds current position in the
                   temporary memory block.

  Level            An internal variable which traces the current nest level to
                   verify correctness of GROUP-END structures.

  FieldPtr         An internal variable used as index inside sub-descriptor for
                   a nested GROUP field.

* Field            A reference to the instance of the TDField class which
                   corresponds to last declared field. Could be useful for
                   further usage in declaration of OVERlaid field.


Methods
-------

  Construct ()
                   Constructor

  Destruct ()
                   Destructor

  Init ()
                   Initializes TDWriter's internal data.

* Reset ()
                   Re-initializes internal data. MUST be called before reusage
                   of the same instance of the TDWriter class for declaration
                   another compound structure.

* Generate (), STRING 
                   Produces type descriptor string on the base of information 
                   stored in the TypeDescriptor object pointed by TD. This
                   generated string describes structural information in the
                   format used by Clarion RTL and could be used for declaration
                   user-defined QUEUEs and FILEs.

  PutBYTE (BYTE)
  PutUNSIGNED (UNSIGNED)
  PutNumber (SIGNED)
  PutCSTRING (*CSTRING)
                   Internal private methods used by Generate() to produce
                   type descriptor string.

  PutField (TDField _Field, UNSIGNED _Offset),UNSIGNED
                   Internal private method to write information about given
                   field into the generating type descriptor string. _Offset
                   parameter is the current offset of the first byte after
                   previously putted field.

  PutGroup (UNSIGNED _LastNestedField)
                   Internal private method to write information about current
                   GROUP field and all its nested fields (index of last of them
                   is passed as a parameter) into the generating type
                   descriptor string.

  TryExpand (UNSIGNED)
  Expand (UNSIGNED)
                   Internal private methods used for managing size of the
                   temporary memory block.


Methods for declaration fields types
------------------------------------

  xSimple (BYTE _Type)
                   Creates a field descriptor with passed simple type _Type
                   and then inserts it to the TD TypeDescriptor object.

  xStringKind (BYTE _Type, UNSIGNED _Size)
                   Creates a field descriptor with passed STRING-kind type
                   (STRING, CSTRING or PSTRING) and with specified size _Size
                   and then inserts it to the TD TypeDescriptor object.

  xBCD (BYTE _Type, UNSIGNED _Size, BYTE _Precision = 0)
                    Creates a field descriptor with passed DECIMAL-kind type
                    (DECIMAL or PDECIMAL) and with specified size _SIZE and
                    precision _Precision and then inserts it to the TD
                    TypeDescriptor object.

* xBYTE ()
* xSHORT ()
* xUSHORT ()
* xLONG ()
* xULONG ()
* xDATE ()
* xTIME ()
* xSREAL ()
* xREAL ()
* xBFLOAT4 ()
* xBFLOAT8 ()
                   These methods create descriptors for fields of corresponding
                   simple types.

* xSTRING  (UNSIGNED _Size)
* xCSTRING (UNSIGNED _Size)
* xPSTRING (UNSIGNED _Size)
                   These methods create descriptors for fields of corresponding
                   STRING-kind types and of specified size _Size.

* xDECIMAL  (BYTE _Size, BYTE _Precision = 0)
* xPDECIMAL (BYTE _Size, BYTE _Precision = 0)
                   These methods create descriptors for fields of corresponding
                   DECIMAL-kind types and of specified size _Size and with
                   specifiedd precision _Precision.
                    
* xWINDOW ()
* xREPORT ()
                   Create descriptors for fields of &WINDOW type.

* xFILE ()
                   Creates descriptors for fields of &FILE type.

* xKEY ()   
                   Creates descriptors for fields of &KEY or &INDEX types.

* xBLOB ()
                   Creates descriptors for fields of &BLOB type.

* xVIEW ()
                   Creates descriptors for fields of &VIEW type.

* xQUEUE ()
                   Creates descriptors for fields of &QUEUE type.
                   Because of run-time nature of XLIB classes it's impossible
                   to distinguish references to different named QUEUE types.

* xCLASS ()
                   Creates descriptors for fields of <reference to CLASS> type.
                   Because of run-time nature of XLIB classes it's impossible
                   to distinguish references to different named CLASS types.

* xANY ()
                   Creates descriptors for fields of ANY type. Not available
                   for FILE record structure declaration.

* xREF (BYTE _SimpleType)
                   Creates descriptors for fields of <reference to given simple
                   type _SimpleType> type. For example, field of &LONG type
                   could be declared by the call xREF(TYPE:LONG) .

* xLIKE (TypeDescriptor)
                   Creates descriptor for the GROUP field with given
                   structure.

* xGROUP ()
* xBEGIN ()
                   These functions begin declarations of fields of GROUP type.
                   They are symonyms. xBEGIN is suitable for declaration of
                   the most outer hidden GROUP.

* xEXTRA ()
                   Allows to append extra fields to the end of completed or
                   imported type descriptor.

* xEND ()
                   Terminates declaration of fields of GROUP type.


Methods for declaration fields attributes
-----------------------------------------


* xDIM (UNSIGNED Dim1 = 0, UNSIGNED Dim2 = 0, UNSIGNED Dim3 = 0, |
        UNSIGNED Dim4 = 0)
                   Specifies dimensions of last declared field. If value of
                   some parameter is equal to 0, all following paraameters
                   are ignoring.

* xOVER (TDField _Field)
                   Specifies another field which occupies the same memory as
                   last declared field does.

* xPICTURE (STRING S)
* xPICTURE (*CSTRING S)
                   Specify the picture for last declared field.

* xNAME (STRING S)
* xNAME (*CSTRING S)
                   Specify the external name for last declared field.

* xLABEL (STRING S)
* xLABEL (*CSTRING S)
                   Specify the label of the last declared field.

================================================================================

xObject class
=============

The xObject class is a virtual base for xQUEUE and xFILECB classes. Its the
only purpose is to declare common virtual methods for derived classes. All
derived classes should include control block for corresponding object (say,
FILECB for xFILECB class) which substitute 'real' entity (say, FILE in the
case of xFILECB class).


Methods
-------

  Construct ()
                   Constructor

  Destruct ()
                   Destructor - just a call of the virtual Kill method

* Kill ()
                   Clean up method which destroys and disposes all internal
                   data of the instance. Could be used for reusage of the
                   same object.

* Build (STRING TypeString)
                   Initializes object's control block on the base of passed
                   type descriptor string.

* TD (),STRING
                   Returns the type descriptor string for the object. Could
                   be used for declaring of other object with the same
                   structure.

* xQUEUE (),*xQUEUE
                   Creates an instance of the xQUEUE class with the same
                   structure as SELF object has.

* xFILE (),*xFILECB
                   Creates an instaance of the xFILECB class with the same
                   record structure as SELF object has.

* xFIELD (SIGNED i),*?
                   Returns an ANY value which references the field with passed
                   ordinal number in the object's layout. Fields numbers are
                   1-based.

* xBUFFER (),*STRING
                   Returns a reference to the object's buffer

* FIELDS (),SIGNED
                   Returns number of fields belonging to this Object.

* Find (STRING FieldName),UNSIGNED
                   The method returns an ordinal number of the field with
                   passed label (including prefix) inside the object's
                   structure. Result is 0 if passed string is not recognized
                   as field's label.

================================================================================

xQUEUE class
============

Instances of this class can be used for run-time declaration of QUEUEs. The Q
field of the xQUEUE class is valid in any context where QUEUEs are available
by the syntax. The xQUEUE class is derived from xObject class.


Fields
------

  CB               QUEUE control block as it's described in CWFILE.H file
                   supplied with CW 1.5 and CW 2.0. The control block contains
                   all required information need for manipulations with a QUEUE

* Q                A reference of the &QUEUE type emulated by address of the
                   control block.


Methods
-------

  Construct ()
                   Constructor

* Kill ()
                   FREEs the QUEUE and cleans up its control block.

* Build (STRING TypeString)
                   Builds the QUEUE control block to conform passed type
                   descriptor string and allocates QUEUE buffer.

* TD (),STRING
                   Returns QUEUE type descriptor string.

* xFIELD (SIGNED i),*?
                   Returns an ANY value which references QUEUE's field with
                   passed ordinal number. Fields numbers are 1-based.

* xBUFFER (),*STRING
                   Returns a reference to the object's buffer

================================================================================

xKEYCB class
============

This class could be used as run-time declaration of files KEYs. Its instances
should be used in conjunction with objects of xFILECB class. The Ref field
is valid in any context where KEYs are available by the syntax.


Fields
------

  CB               KEY control block as it's described in CWFILE.H file
                   supplied with CW 1.5 and CW 2.0. The control block contains
                   all required information need for manipulations with a KEY.

* Ref              A reference of the &KEY type emulated by address of the
                   control block.

* FCB              A reference to the instance of xFILECB class this key
                   emulation is dependent from.

  Num              Number of the key in the list of FILE's KEYs.

  Declaration      A string with a list of key components like in the Clarion
                   syntax for KEYs.


Methods
-------

  Construct ()
                   Constructor

  Destruct ()
                   Destructor - just a call of the virtual Kill method

* Kill ()
                   Clean up method which destroys and disposes all internal
                   data of the instance. Could be used for reusage of the
                   same object.

* xBEGIN (xFILECB F)
                   Initializes declaration of the new key for a file emulated
                   by F. By default this key definition will be inserted to
                   the end of file's keys list.

* Load (xFILECB F, BYTE N = 0)
                   Initializes an instance on the base of information about
                   Nth key of the FILE emulated by F if N <> 0. If N = 0,
                   the call is equivalent to xBEGIN(F).

* Load (xFILECB F, KEY K)
                   Initializes an instance on the base of information about
                   K key. K should be existent key of the FILE emulated by F.

* xKEY (STRING Components),BYTE
                   Sets components list for the key. Components string should
                   follow Clarion syntax. Result is FALSE if syntax is not
                   correct or at least one component has not been recognized
                   as FILE's field. The call of this method is valid after
                   xBEGIN or Load.

* xLABEL (STRING S)
                   Sets or replaces the label of the key. The call of this
                   method is valid after xBEGIN or Load.

* xNAME (STRING S)
                   Sets or replaces the NAME attribute of the key. The call of
                   this method is valid after xBEGIN or Load.

* xATTR (UNSIGNED Attr)
                   Sets or replaces attributes of the key. The parameter is a
                   set of bitmap flags listed in XFILE.INC . The call of this
                   method is valid after xBEGIN or Load.

* xEND ()
                   Completes key declaration and inserts it to the file control
                   block at default or specified (in Load) relative position.

* Insert (BYTE N = 0)
                   Inserts key declaration to the file control block at given
                   (if N<>0) relative position. If N=0, this method's call is
                   equivalent to xEND().

* xFILE (),*xFILECB
                   Returns the reference to the xFILECB class instance this
                   key depends from.

* Component (BYTE N),SIGNED
                   Returns its Nth component as signed field number of the
                   FILE this KEY belonging to. The function returns 0 if
                   passed index is out of valid range.

  Update (),BYTE
  Rebuild (),BYTE
                   Internal methods for adjusting key declaration after changes
                   in the declaration of the file this key depends from.

  _Load (LONG CBAddr)
                   Internal private method which performs loading information
                   from the existent key declaration.


================================================================================

xMEMOKind class
===============

This class could be used as run-time declaration of files MEMOs and BLOBs and
provides common properties of these entities. Its instances should be used in
conjunction with objects of xFILECB class.


Fields
------

  CB               MEMO control block as it's described in CWFILE.H file
                   supplied with CW 1.5 and CW 2.0. The control block contains
                   all required information need for manipulations with a MEMO.

* FCB              A reference to the instance of xFILECB class this MEMO or
                   BLOB emulation is dependent from.

  Num              Number of the MEMO/BLOB in the list of FILE's MEMOs.


Methods
-------

  Construct ()
                   Constructor

  Destruct ()
                   Destructor - just a call of the virtual Kill method

* Kill ()
                   Clean up method which destroys and disposes all internal
                   data of the instance. Could be used for reusage of the
                   same object.

* xBEGIN (xFILECB F)
                   Initializes declaration of the new MEMO or BLOB for a file
                   emulated by F. By default this MEMO/BLBO definition will be
                   inserted to the end of file's MEMOs list.

* Load (xFILECB F, BYTE N = 0)
                   Initializes an instance on the base of information about
                   Nth MEMO of the FILE emulated by F if N <> 0. If N = 0,
                   the call is equivalent to xBEGIN(F).

* xLABEL (STRING S)
                   Sets or replaces the label of the MEMO/BLOB. The call of
                   this method is valid after xBEGIN or Load.

* xNAME (STRING S)
                   Sets or replaces the NAME attribute of the MEMO/BLOB. The
                   call of this method is valid after xBEGIN or Load.

* xBINARY (BYTE = TRUE)
                   Sets or replaces BINARY attribute of the MEMO. It as no
                   sense for BLOBs. The call of this method is valid after
                   xBEGIN or Load.

* xEND ()
                   Completes MEMO/BLOB declaration and inserts it to the file
                   control block at default or specified (in Load) relative
                   position.

* Insert (BYTE N = 0)
                   Inserts MEMO/BLOB declaration to the file control block at
                   given (if N<>0) relative position. If N=0, this method's
                   call is equivalent to xEND().

* xFILE (),*xFILECB
                   Returns the reference to the xFILECB class instance this
                   MEMO/BLOB depends from.


================================================================================

xMEMOCB class
=============

This class is derived from the xMEMOKind class and provides specific properties
of MEMOs. Because in Clarion MEMOs are considering as strings, the Ref field
which references MEMO's buffer, can be used in any context where STRING value
is available to pass MEMO field's contents.


Fields
------

* Ref              A reference to the MEMO's buffer as to string.


Methods
-------

* Kill ()
                   Clean up method which destroys and disposes all internal
                   data of the instance. Could be used for reusage of the
                   same object.

* xMEMO (UNSIGNED Size = 0)
                   Sets or changes the size of MEMO field. The call of this
                   method is valid after xBEGIN or Load. If MEMO's declaration
                   has been initiated by xBEGIN, the call of this method is
                   obligate.

================================================================================

xBLOBCB class
=============

This class is derived from the xMEMOKind class and provides specific properties
of BLOBs. The Ref field is valid in any context there BLOB is available.


Fields
------

* Ref              A reference of the &BLOB type which allow to use xBLOBCB
                   class's instance as a BLOB emulation.


Methods
-------

* Kill ()
                   Clean up method which destroys and disposes all internal
                   data of the instance. Could be used for reusage of the
                   same object.

* xBLOB ()
                   Initializes the Ref field. The call of this method is valid
                   after xBEGIN or Load and required to use xBLOBCB as a BLOB.


================================================================================

xFILECB class
=============

Instances of this class can be used for run-time declaration of FILEs. The F
field of the xFILECB class is valid in any context where FILEs are available
by the syntax. The xFILECB class is derived from xObject class.


Fields
------

  CB               FILE control block as it's described in CWFILE.H file
                   supplied with CW 1.5 and CW 2.0. The control block contains
                   all required information need for manipulations with a FILE.

* F                A reference of the &FILE type to object's CB field. This
                   field allows to use instances of the xFILECB classes for
                   emulation of "normal" Clarion's FILE objects.

* Prefix           A reference to the file's prefix.

  Statics          An internal set of bitmapped flags listed in XFILE.INC . If
                   some bit is cleared, this means that corresponding part of
                   file description has been reallocated in program's heap.

  DriverHandle     A handle of the file driver library.


Methods
-------

  Construct ()
                   Constructor

  Reset ()
                   Internal methods which clears instances data. It closes a
                   file if it has been opened and disposes its buffer. Other
                   parts of the control block not affected by this method.

* Kill ()
                   Clean up method which destroys and disposes all internal
                   data of the instance. Could be used for reusage of the
                   same object.

* Build (STRING TypeString)
                   Initializes object's control block on the base of passed
                   type descriptor string.

* TD (),STRING
                   Returns FILE type descriptor string.

* Load (FILE F, BYTE Full = 0)
                   Loads information from the passed FILE declaration to
                   emulate it. If the Full parameter is TRUE, the method
                   allocates copies for all KEYs and MEMOs in the heap.
                   Otherwise, instance receives its own copy of file's buffer
                   only. Default value of Full parameter is FALSE. This value
                   is suitable if FILE's structure is not subject to change.
                   If program will change FILE's structure, the recommended
                   value for Full parameter is TRUE.

* xDRIVER (STRING DriverName, <STRING DriverString>)
                   Has the same semantics as FILE's DRIVER() attribute. Sets
                   file's driver and optional driver string.

* xPRE (STRING Prefix)
                   Sets are changes prefix of the file.

* xOWNER (STRING S)
                   Has the same semantics as FILE's OWNER() attribute. Exact
                   sense of this value is driver dependent.

* xNAME (STRING S)
                   Has the same semantics as FILE's NAME() attribute. Exact
                   sense of this value is driver dependent.
                   
* xATTR (BYTE Attr)
                   Sets flag attributes for file. Passed value is bitmap of
                   flags listed in XFILE.INC (FILE:* values).

* xFIELD (SIGNED i),*?
                   Returns reference to i-th field in FILE's record structure.

* xBUFFER (),*STRING
                   Returns a reference to the object's buffer

* xKEY (BYTE i),*xKEYCB
                   Returns reference to the instance of the xKEYCB class which
                   corresponds to i-th key in FILE's declaration. Returned
                   instance MUST NOT be disposed after usage.

* xMEMO (BYTE i),*xMEMOKind
                   Returns reference to the instance of the xMEMOKind class
                   which corresponds to i-th key in FILE's declaration.
                   Returned instance MUST NOT be disposed after usage.

* FieldLabel (UNSIGNED N),STRING
                   Returns a label of N-th field in FILE's record structure.

  RebuildKeys (*CSTRING OldPrefix)
                   Internal private method which rebuilds assotiated xKEYCB
                   structures after vital changes in FILE's declaration, say,
                   after inserting of new fields. This method not affects
                   instances of the xKEYCB class created by xKEY method.

  LoadKeys ()
                   Internal private method which loads all keys' control
                   blocks to instances of the xKEYCB class allocated in the
                   heap.

  LoadMemos ()
                   Internal private method which loads all memos' control
                   blocks to instances of the xMEMOKind class allocated in the
                   heap.

  KillKeys ()
                   Internal private method which kills assotiated instances of
                   the xKEYCB class. This method not affects instances of the
                   xKEYCB class created by xKEY method.

  KillMemos ()
                   Internal private method which kills assotiated instances of
                   the xMEMOKind class. This method not affects instances of
                   the xMEMOKind class created by xMEMO method.


================================================================================

TDHelper module
===============

TDHelper.CPP module implements several useful functions which are using by
methods of XLIB library classes. 

  TypeDesc (*BYTE),STRING
                   Pushes the type descriptor passed by address of its first
                   byte to the Clarion string stack.

* GetTypeDesc (*QUEUE),STRING
                   Returns QUEUE's type descriptor string.

* GetTypeDesc (*GROUP),STRING
                   Returns GROUP's type descriptor string.

* GetTypeDesc (LONG),STRING
                   Returns CLASS's type descriptor string. Because Clarion
                   not allows parameters of generic CLASS type, this function
                   should be called with actual parameter equal to address
                   of class's instance.

* GetTypeDesc (FILE),STRING
                   Returns FILE record's type descriptor string.

  GetViewPipe (),LONG
                   Returns the adddress of VIEW pipe function.

  GetFCB (KEY),*FILE
                   Returns reference to a file passed KEY belongs to.

  GetFCB (FILE),LONG
                   Returns address of the control block for the passed FILE.

  GetKCB (KCB),LONG
                   Returns address of the control block for the passed KEY.

  GetMEMOType (FILE, BYTE N),BYTE
                   Returns 0, if N-th MEMO of passed FILE is a BLOB, and 1
                   if it's a MEMO.

  CommonPrefix (*CSTRING,*CSTRING),UNSIGNED
                   Returns the length of the common prefix of two passed
                   strings.