e4Tree

While this introduction still holds pretty well, much more information is at E4Graph, as this is now a project on Sourceforge.

INTRODUCTION

e4Tree is an extension of Metakit that adds the ability to manipulate persistent trees of arbitrary information with Metakit. Suppose you want to store your address book in Metakit; right now that's possible but somewhat unnatural. With e4Tree you'd simply create a "addresses" tree with nodes for each address you want to store. Each node contains the usual stuff that makes up an address, such as the telephone number, street address, or even email. Since not every address node contains every kind of information, you might be wasting some storage if you did this with an "addresses" table directly in Metakit, because every row would e.g. have an "email" column. Using e4Tree only nodes that contain email addresses would have an "email" field.

If you need to store some special information about someone's address, for example the person's birthday, add a field named "birthday" to that node only, and store the relevant information.

DETAILS

e4Tree allows you to store any number of forests in a Metakit storage. Each forest consists of any number of trees, and each tree consists of any number of nodes. Each tree has a distinguished node called its "root"; all trees have at least a "root" node.

A node can contain data of various types in named fields. The exact data types supported are: node, integer, floating point number, NULL-terminated string and binary value. Because a field can contain a node, it is possible to build arbitrary trees.

There can be any number of fields with the same name in a node. Fields are ordered by a zero-based rank. Fields are addressed either by name (plus an optional number to select the nth occurrence of that name) or rank.

The set of operations on e4Tree supplied abstractions is as follows:

e4_Storage: get a reference to a forest, create a forest, delete a forest.

e4_Forest: get a reference to a tree, create a tree, delete a tree.

e4_Tree: Get the root node, return the count of nodes in the tree.

e4_Node: Get the value of a field, set the value of a field (creating it if it does not exist), get the name and type of a field, rename a field, delete a field, check if a field with a specific combination of properties exists.

AVAILABILITY

e4Tree is currently in debugging before its initial release. I have to write more documentation as well. When these tasks are completed, an initial release will be made.

(JC) The "I" above refers to Jacob Levy, who is the author of e4Tree.

 Very interesting. How can we find out more

(Note: This is my first time editing with wiki, so excuse anything weird) Nicolas Boretos [email protected]