/**************************************************************************/ /* File: linked_list.h */ /**************************************************************************/ /* Project: Continuous Speech Recognition Search Algorithms */ /* Author: Neeraj Deshmukh, Aravind Ganapathiraju */ /* Class: EE 8993 Spring 1996 Date: March 27, 1996 */ /**************************************************************************/ /*======================================================================== This file declares the generic linked list class that is used in various applications in the speech recognizer ========================================================================*/ /*------------------------------------------------------------------------ make sure definitions are only made once ------------------------------------------------------------------------*/ #ifndef __ISIP_LINKED_LIST #define __ISIP_LINKED_LIST /*------------------------------------------------------------------------ system and ISIP include files ------------------------------------------------------------------------*/ #include "hmm_matrix.h" /*======================================================================== Linked_List class definition for the generic linked list class ========================================================================*/ class Linked_List { // members // protected: /*------------------------- next link and the element -------------------------*/ Linked_List *next_link_ptr; Linked_List *prev_link_ptr; void *element_ptr; // methods // public: /*--------------------------- constructors and destructor ---------------------------*/ Linked_List (void *elem_ptr = NULL); virtual ~Linked_List (); /*---------------------- input / output methods ----------------------*/ void *get_element_cc (); // get element stored in link void set_element_cc (void *elem_ptr); // set element at current link /*------------------- linked list methods -------------------*/ Linked_List *get_next_link_cc (); // get the next link Linked_List *get_prev_link_cc (); // get the previous link Linked_List *add_link_cc (void *elem_ptr); // add an object to list Linked_List *find_link_cc (void *elem_ptr); // find link with given element BOOL remove_link_cc (void *elem_ptr); // delete link with element }; #endif