16#ifndef TRUSTList_included
17#define TRUSTList_included
19#include <TRUSTListElem.h>
31template<
typename _TYPE_>
39 min_data = std::numeric_limits<_TYPE_>::max();
40 max_data = std::numeric_limits<_TYPE_>::lowest();
48 min_data = a_list.min_data;
49 max_data = a_list.max_data;
51 if (a_list.
est_vide()) this->suivant_ =
this;
54 this->data = a_list.data;
58 TRUSTListElem<_TYPE_> *next = new TRUSTListElem<_TYPE_>(*a_list.suivant_);
59 this->suivant_ = next;
61 else this->suivant_ = 0;
68 inline int size()
const {
return size_; };
70 inline int rang(_TYPE_)
const;
94 _TYPE_ min_data, max_data;
101template<
typename _TYPE_>
109 inline operator bool()
const {
return (curseur != 0); }
112 inline void operator++() { curseur = curseur->est_dernier() ? 0 : &(curseur->suivant()); }
115 inline _TYPE_
valeur()
const {
return curseur->valeur(); }
116 inline _TYPE_&
valeur() {
return curseur->valeur(); }
140#include <TRUSTList.tpp>
Class defining operators and methods for all reading operation in an input flow (file,...
Classe de base des flux de sortie.
: Classe qui sert a representer une liste de reels int/double precision.
: List_Curseur de reels int/double precision
TRUSTList_Curseur(const TRUSTList< _TYPE_ > &a_list)
void operator=(const TRUSTList< _TYPE_ > &a_list)
TRUSTListElem< _TYPE_ > & list()
const TRUSTListElem< _TYPE_ > & list() const
TRUSTList_Curseur(const TRUSTListElem< _TYPE_ > &a_list)
: Classe qui sert a representer une liste de reels int/double precision.
const _TYPE_ & operator[](int) const
_TYPE_ & operator[](int)
Operateur d'acces au ieme int de la liste.
Sortie & printOn(Sortie &os) const
Ecriture d'une liste sur un flot de sortie les elements separes par des virgules figurent entre des a...
TRUSTList & add(_TYPE_)
insertion en queue
int rang(_TYPE_) const
renvoie le rang d'un element dans la liste si un element apparait plusieurs fois, renvoie le rang du ...
TRUSTList & add_if_not(_TYPE_)
Ajout d'un element a la liste ssi il n'existe pas deja.
TRUSTList(const TRUSTList &a_list)
Entree & readOn(Entree &is)
Lecture d'une liste sur un flot d'entree les elements separes par des virgules figurent entre des acc...
void suppr(_TYPE_)
Supprime un element contenu dans la liste.
int contient(_TYPE_) const
Verifie si un element appartient ou non a la liste.
const TRUSTListElem< _TYPE_ > & dernier() const
TRUSTList & operator=(const TRUSTList &)
Affectation.
void vide()
Vide la liste.
TRUSTListElem< _TYPE_ > & dernier()
Renvoie le dernier element de la liste.