// file: link_node.h
//
// this is the header file for the linked list node class
//

// make sure definitions are only made once
//
#ifndef __ISIP_LINK_NODE
#define __ISIP_LINK_NODE

// isip include files
//
#ifndef __ISIP_INTEGRAL
#include <integral.h>
#endif

// Link_node: a class that holds a bidirectional linked list
//
class Link_node {

  //---------------------------------------------------------------------------
  //
  // protected data
  //
  //---------------------------------------------------------------------------
protected:

  // linked list node data
  //
  void_p item_d;                // the data contained here
  Link_node* prev_d;            // the previous node in the list
  Link_node* next_d;            // the next node in the list

  //---------------------------------------------------------------------------
  //
  // public methods
  //
  //---------------------------------------------------------------------------
public:
  
  // required methods
  //
  char_1* name_cc();
  volatile void error_handler_cc(char_1* method_name, char_1* message);
  logical_1 debug_cc(FILE *fp, char_1* message);
  int_4 size_cc();
  
  // destructors/constructors
  //
  ~Link_node();
  Link_node();                                       // default
  Link_node(void_p link);                            // overloaded
  Link_node(const Link_node& node);                  // copy

  // insert / remove methods
  //
  logical_1 insert_cc(Link_node* node);
  logical_1 remove_cc(Link_node* node);
  
  // set data access methods
  //
  logical_1 set_item_cc(void_p item);
  logical_1 set_prev_cc(Link_node* node);
  logical_1 set_next_cc(Link_node* node);
  
  // get data access methods
  //
  void_p get_item_cc();
  Link_node* get_prev_cc();
  Link_node* get_next_cc();
  
  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:

};

// end of file
// 
#endif
