#include "ListeChainee.hxx"
#include <iostream>
using namespace std;

typedef ListeChainee<int> ListeChaineeInt;
typedef Iterateur<int>    IterateurInt;


int main(int, char **)
{
  ListeChaineeInt l1;

  l1.push_front(10);
  l1.push_front(20);

  l1.push_back(30);
  l1.push_back(50);

  IterateurInt courant=l1.begin();
  IterateurInt fin=l1.end();

  while (fin != courant)
  {
    cout << *courant << endl;
    courant.avance();
  }

  cout << l1 << endl;

  l1.pop_front();

  cout << l1 << endl;

  l1.pop_back();
  
  cout << l1 << endl;

  l1.pop_front();

  cout << l1 << endl;

  l1.pop_front();

  cout << l1 << endl;

  l1.pop_front();
  
  cout << l1 <<endl;

  l1.pop_back();

  cout << l1 << endl;
  
  l1.insert(l1.begin(),75);
  
  cout << l1 << endl;
  
  l1.insert(l1.end(),85);
  
  cout << l1 << endl;

  return 0;
  
};
