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

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

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

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

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

  // linked list node data
  //
  void_p item_d;                // the data contained here
  Train_Link_node* prev_d;            // the previous node in the list
  Train_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
  //
  ~Train_Link_node();
  Train_Link_node();                                       // default
  Train_Link_node(void_p link);                            // overloaded
  Train_Link_node(const Train_Link_node& node);                  // copy

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

};

// end of file
// 
#endif
