/* -*-	Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */

/* By Pablo Martin and Paula Ballester,
 * Strathclyde University, Glasgow.
 * June, 2003.
*/

/* Copyright (c) 2003 Strathclyde University of Glasgow, Scotland.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code and binary code must contain
 * the above copyright notice, this list of conditions and the following
 * disclaimer.
 *
 * 2. All advertising materials mentioning features or use of this software
 * must display the following acknowledgement:
 * This product includes software developed at Strathclyde University of
 * Glasgow, Scotland.
 *
 * 3. The name of the University may not be used to endorse or promote
 * products derived from this software without specific prior written
 * permission.
 * STRATHCLYDE UNIVERSITY OF GLASGOW, MAKES NO REPRESENTATIONS
 * CONCERNING EITHER THE MERCHANTABILITY OF THIS SOFTWARE OR THE
 * SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE.  The software
 * is provided "as is" without express or implied warranty of any kind.
*/

#include <stdio.h>
#include <string.h>

struct List
{  	int src_;
  	int flow_;
  	double rate_;
	int type_;	
  	List* Next;
  	List() {Next=NULL;src_=-1;flow_=-1;rate_=0.0;type_=-1;}
};
typedef List* ListPtr;


class SLList
{ public:
  SLList();
  ~SLList();
  ListPtr Previous(ListPtr);
//  void Advance();
//  void Rewind();
  void AddANode();
  void AddANode(int src, int flow, double rate, char* type);
  void DeleteANode(ListPtr);
  void DeleteANode(int src, int flow);
  ListPtr GetNode(int src, int flow);
  double lookforrate(int src, int flow);
  int lookfortype(int src, int flow);

  ListPtr Head,Tail,CurrentPtr;
};
