Wanted! Tree Node implementation.

Like a:

mixin template TreeNode( T )
{
    T parent;
    T firstChild;
    T lastChild;
    T prevSibling;
    T nextSibling;

    // ForwardRange implementation
    @property T front() { ... }
    @property bool empty() { ... }
    void popFront() { ... }

    // BackwardRange implementation
    @property T back() { ... }
    void popBack();

    // RandomAccessRange implementation
    T opIndex( ... ) { ... }

    // length implementation
    @property size_t length() { ... }
}

It would be nice to get a link or package or source...


  • Wanted! Tree Node impl... Виталий Фадеев via Digitalmars-d-learn

Reply via email to