Code Fragment: Position



  class Position {					// position in the tree
  private:
    NodePtr node;					// pointer to the node
  public:
    Position(NodePtr n = NULL)				// constructor
      { node = n; }
    Object& element() const 				// get element
      { return node->element; }
    bool isNull() const 				// null position?
      { return node == NULL; }
    friend LinkedBinaryTree;				// allow access
  };