StringTree

StringTree version 1.58

Authors: Amine Moulay Ramdane and Kjell Hasthi (It's based on Kjell Hasthi unit)

Description:

TStringTree class implements a non-visual tree structure like that found in TreeView. TStringTree is a class for handling a tree-structured stringlist. TStringTree is very similar to directory structures , it uses the familiar terms of "directories" and "files" instead of nodes and child nodes. This unit is based on Kjell Hasthi unit , but i have redesigned it and enhanced it much more and it is now much more faster than Kjeli Hasthi unit and it also uses my Parallel Sort library and it uses my faster HashStringList.

If you look at the source code of my new and very fast StringTree, you will notice that it is now considered to have the same level of quality as a good industrial library... so why i am doing this affirmation ? cause what i have done is designing my StringTree taking into account the important factor that is the time and space algorithmic's complexity of my algorithms, before, i have used a datastructure called StringList that you find in Delphi and Freepascal , this datastructure uses an array as an implementation, StringList adds a key as a string's type and an object as an element inside the array.. so the add() method is fast, but the search method is "sequential", so the time algorithmic's complexity of the search method of StringList is sequential , so it is not good, so i have tried to use another datastructure called HashedStringList inside Delphi and FreePascal, this datastructure uses a hashtable over StringList's datastructure to optimize the search in O(1) best case complexity, but HashedStringList was still slow, this is why i have implemented my very fast HashStringList datastructure that you will find inside the zip and that uses a hashtable to optimize the StringList's datastructure and that render the search in O(1) time complexity in best case and log(n) time complexity in average case and that is very fast, this has allowed my StringTree to be very efficient and very fast, also i have also treated my StringTree as a database that must be indexed to become very fast, so i have indexed some "tables" inside StringTree using my very fast HashStringList to render my StringTree a very fast library , also i have rewritten almost all the methods of the first StringTree and i have rendered it a powerful library, and i have stress tested it and you can be confident cause i think that it is now more stable. This is why i have said that my StringTree is now considered to have the same level of quality as a good industrial library...

And please look at test.pas demo inside the zipfile - compile and execute it...

You can go to download the zip files by clicking on the following web link:

https://drive.google.com/drive/folders/1HvFRxElD7uWA-6oISQKaH-Gu1l35ncCT?usp=sharing

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Win , Linux and Mac (x86).

Required FPC switches: -O3 -Sd 

-Sd for delphi mode....

Required Delphi 7 to 2007 switches: -$H+ -DDelphi

Required Delphi XE switches: -$H+ -DXE

The defines options inside defines.inc are:

{$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems

{$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems