ctkBtree - Btree

        ctkBtree implements a b-tree with hashes of hashes.

Syntax

        my $bt = ctkBtree->new().
        my $stack = $bt->getStack()
        $bt->traverse_DF_in(callback);
        $bt->traverse_DF_pre(callback);
        $bt->traverse_DF_post(callback);
        $bt->traverse_BF(callback);
        $bt->traverse_DF2_pre(hash1,hash2,callback_1, callback_2, callback);
        where callback may be
                        callback := refToSub | arglist
                                refToSub := 'sub{' code '}' | \&subroutineName
                                        code := any perl code
                                arglist := refToSub (args)
                                        args := any valid perl argument list

Programming notes

Callbacks and events of traverse_DF2_pre
        Method traverse_DF2_pre invokes the following callbacks on corresponding events
        - onExist1  passed node ident exists only in hash1
        - onExist2  passed node ident exists only in hash2
        - onExist   passed node ident exists on both hash1 and hash2
Restrictions
        - node ident must be scalar (strings)
        - hash must contain only scalars and hashes
        - node ident must be unique key inside any sibling 
        - sibling are always accessed in ascending order

Maintenance

        Author: Marco
        date:   21.09.2006
        History
                        21.09.2006 First draft

Back to index