#include "types.h"

class List {
public:
    List(void) : top(0), bottom(0) {}
    void    add(Object& object);
    void    insert(uint32 i, Object& object);
    void    remove(Object& object);
    Object* get(uint32 i);
    bool    isEmpty(void) {return top == 0;}

private:
    struct Node {
        Node*   prev;
        Node*   next;
        Object* value;
    };

    Node* getNode(Object& object);
    Node* getNode(uint32 i);
    Node* top;
    Node* bottom;
};

