Which structure/class should I use?
| Thu, 2007-01-04 12:16 | |
|
Hi,
A text file is given which contains the following lines of text: Root|NodeA|Foo Root|NodeB|Bar Root|NodeB|Baz Now I want to put the strings into descriptors and put these into a hierachical (tree/map whatever) structure. Root / \ NodeA NodeB | | \ Foo Bar Baz I don't want to use an XML class or something with such an overhead. Can somebody suggest an appropritate Symbian-class for that problem. An example algorithm for transfering the file content into that structure would be great. regards Martin |
|






Forum posts: 732
S60 Platform: DBMS Example v2.0.
Forum posts: 24
[1] What sort of tree are u creating Binary, B+ ,general.If it is a Binary Tree then u can look at the DBMS Example and store the left and the right values.This is Called as Persistent Storeage and the link above(given by the previous user is quite exhaustive)
U can use the select clause to traverse trgh the records.Typically this is how ur Fields should look
+---------------------------------------------------+
|NodeName |Left Element| Right Element |
------------------------------------------------------
If u can elobarate a bit more i can give u the source code
Symbian Develpoer
Forum posts: 63
What I want to do is to put the given text strings "Root|NodeA|SubNodeA| ... |Leaf" into a structure which I can easily traverse (dont know if this is the correct term).
So a node can have more than two children - I dont know which kind of tree fits best here.
Martin
Forum posts: 683