template class axl::sl::BinTreeBase

#include <axl_sl_BinTree.h>

template <
    typename T,
    typename Node,
    typename Key,
    typename Value,
    typename Cmp,
    typename KeyArg,
    typename ValueArg
    >
class BinTreeBase
{
public:
    // typedefs

    typedef sl::Iterator<Node> Iterator;
    typedef sl::ConstIterator<Node> ConstIterator;

    // construction

    BinTreeBase(const Cmp& cmp = Cmp());

    // methods

    Value&
    operator[](KeyArg key);

    const Value&
    operator[](KeyArg key) const;

    bool
    isEmpty() const;

    size_t
    getCount() const;

    Iterator
    getHead();

    ConstIterator
    getHead() const;

    Iterator
    getTail();

    ConstIterator
    getTail() const;

    Iterator
    find(KeyArg key);

    ConstIterator
    find(KeyArg key) const;

    Iterator
    find(
        KeyArg key,
        BinTreeFindRelOp relOp
        );

    ConstIterator
    find(
        KeyArg key,
        BinTreeFindRelOp relOp
        ) const;

    Value
    findValue(
        KeyArg key,
        ValueArg undefinedValue
        ) const;

    Value
    findValue(
        KeyArg key,
        BinTreeFindRelOp relOp,
        ValueArg undefinedValue
        ) const;

    Iterator
    visit(KeyArg key);

    Iterator
    add(
        KeyArg key,
        ValueArg value,
        bool* isNew = NULL
        );

    Iterator
    addIfNotExists(
        KeyArg key,
        ValueArg value
        );

    void
    erase(Iterator it);

    bool
    eraseKey(KeyArg key);

    void
    clear();
};