dzTemplates 1.0.2

By Thomas Mueller

Freeware 15 May 2006

In category

Components > Experts, IDE etc. > Code Templates

Description

dzTemplates is a set of container pseudo templates for Delphi, Kylix and other Object Pascal compilers. It adds some kind of C++ like templates to the language by using include files.

dzTemplates is a set of type safe containers that can be easily used to store whatever data you want it to store.

The following containers are available:

  • List templates are the most generic containers. They come in two flavours: One that stores anything that can be typecasted into a pointer or an interface and one that assumes the items are descendants of TObject and "owns" them (that is, it will free them in its destructor). There is also an interface declaration for this kind of container (dzListInterfaceTemplate).
    • dzListTemplate / dzObjectListTemplate is the most generic container it stores its items in the order they are added.
    • dzSortedListTemplate / dzSortedObjectListTemplate is based on dzListTemplate and adds a sort order to it. It introduces methods for comparing two items and searching for them with a binary search algorithm. A Duplicates property like the one in TStringList determines what to do with duplicate items.
    • dzIntegerSortedListTemplate / dzIntegerSortedObjectListTemplate is a specialized descendant of dzSortedListTemplate which assumes that its items are sorted by an integer value.
  • dzStackTemplate / dzObjectStackTemplate are both stacks (LIFO = last in first out), again one for storing anything that can be typecasted to a pointer or interface and one for storing TObject descendants.
  • dzQueueTemplate is a queue (FIFO = first in first out) for storing anything that can be typecasted to a pointer or interface. There is currently no dzObjectQueueTemplate but I will add one shortly.
  • dzHashTemplate is a hash or associative array for storing items and accessing them via an associated string.

Informations

  • Status: Fully functional
  • Source: FW
  • Size: 70 598kB

Platforms:

  • Delphi 2005 (VCL)
  • Delphi 2006 (Win32)

Downloads