Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-06

Tree data structure

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Xiangrong Fang

Hello,

Is there any built-in general Tree data structure in FPC/Lazarus library? "General" means:

1) it is a "generic" class or its "node" is a pointer which is suitable for general use

2) it is NOT balanced tree or binary tree, but just like a file system tree.

In another word, I am looking for a lightweight, pure "data" class that is TTreeView without a GUI binding.

Thanks,
Shannon

Sven Barth
to Xiangrong Fang
Xiangrong Fang wrote 13 lines
Hello, Is there any built-in general Tree data structure in FPC/Lazarus library? "General" means: 1) it is a "generic" class or its "node" is a pointer which is suitable for general use 2) it is NOT balanced tree or binary tree, but just like a file system tree. In another word, I am looking for a lightweight, pure "data" class that is TTreeView without a GUI binding.

If you are using 2.7.1 you can take a look at the gtree unit from fcl-stl:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-stl/src/gtree.pp?revision=23453&view=markup

Regards,
Sven

Graeme Geldenhuys
to Xiangrong Fang: Is there any built-in general Tree data structure in FPC/Lazarus library? "General" means:
Xiangrong Fang wrote
In another word, I am looking for a lightweight, pure "data" class that is TTreeView without a GUI binding.

You can use tiOPF's base classes: TtiObjectList and TtiObject. tiOPF can be used without the persistence part - simply as data containers and then benefit from all the other niceties tiOPF offers - like visitors, iteration, observer etc.

http://www.tiopf.com

Regards,
G.