/***************************************************************
 * PrNode.h
 *
 * This class provides a robot node.
 *
 ****************************************************************/

/*
 * modification history
 *----------------------
 *
 * 11/07/97: K.C. Chang: created.
 */

#ifndef _PrNode_h
#define _PrNode_h

#include "PrLink.h"

class PrNode
{
  public:
    PrNode();
    ~PrNode() { delete link_; }

    void parent(PrNode *node) { parent_ = node; }
    PrNode *parent() { return parent_; }

    void nextSibling(PrNode *node) { nextSibling_ = node; }
    PrNode *nextSibling() { return nextSibling_; }

    void firstChild(PrNode *node) { firstChild_ = node; }
    PrNode *firstChild() { return firstChild_; }

    
  private:
    PrLink *link_;
    PrNode *parent_;
    PrNode *nextSibling_;
    PrNode *firstChild_;
};

inline PrNode::PrNode()
{
    link_ = new PrLink();
    parent_ = NULL;
    nextSibling_ = NULL;
    firstChild_ = NULL;
}

#endif // _PrNode_h
