#include <iterator_array.h>
Inheritance diagram for IteratorTableau< T >:


Public Types | |
| typedef Contener< T, Iterator< T, IteratorTableau< T > > > | myContener |
| type of associated contener | |
| typedef Iterator< T, IteratorTableau< T > > | Parent |
| type of parent in heritage | |
Public Member Functions | |
| T & | GetFirst () |
| get fist item | |
| T & | GetNext () |
| get next item in course | |
| IteratorTableau (ContenerTableau< T > &c) | |
Private Attributes | |
| int | index_courant |
| current index in course | |
| int | index_debut |
| first index in course | |
| int | index_fin |
| last index in course | |
| T | invalid_ref |
| reference to invalid item | |
| T ** | tab_parcours |
| pointer to avoid over-cost in using STL vector | |
Definition at line 60 of file iterator_array.h.
| typedef Contener<T,Iterator<T,IteratorTableau<T> > > IteratorTableau< T >::myContener |
| typedef Iterator<T,IteratorTableau<T> > IteratorTableau< T >::Parent |
| IteratorTableau< T >::IteratorTableau | ( | ContenerTableau< T > & | c | ) | [inline] |
Definition at line 69 of file iterator_array.h.
00069 : 00070 Iterator<T,IteratorTableau<T> >(c), 00071 index_courant(0), 00072 index_debut(0) 00073 { 00074 //TODO améliorer les classe de conteneur et iterateur en définissant le type T 00075 ContenerTableau<T> & cont = static_cast<ContenerTableau<T> &>(Parent::my_cont); 00076 index_fin = cont.nbElem(); 00077 };
| T& IteratorTableau< T >::GetFirst | ( | ) | [inline] |
get fist item
Reimplemented from Iterator< T, IteratorTableau< T > >.
Definition at line 80 of file iterator_array.h.
Referenced by FormeFaible< DomainA, DomainC, Dim >::ApplyAtomsCorrection(), FormeFaible< DomainA, DomainC, Dim >::BuildAtomsRHS(), Bridging< DomainA, DomainC, Dim, Pond >::BuildAtomsWeight(), BelytschkoFull< DomainA, DomainC, Dim >::BuildConstraintMatrix(), FormeFaible< DomainA, DomainC, Dim >::BuildContinuConstraintMatrix(), LeastSquare< DomainA, DomainC, Dim >::BuildLeastSquareRHS(), BridgingPar< DomainA, DomainC, Dim, Pond >::CorrectSurfaceEffect(), FormeFaible< DomainA, DomainC, Dim >::CorrectWeights(), LeastSquare< DomainA, DomainC, Dim >::CorrigeAtoms(), Bridging< DomainA, DomainC, Dim, Pond >::Dump(), FiltreAtom< Domain, Dim >::GetFirst(), FiltreMesh< Domain, Dim >::GetFirstElem(), and FiltreMesh< Domain, Dim >::GetFirstNode().
00080 { 00081 Parent::end_flag = false; 00082 index_courant = 0; 00083 tab_parcours = &(static_cast<ContenerTableau<T>&>(Parent::my_cont).tableau[0]); 00084 T * t = NULL; 00085 if (static_cast<ContenerTableau<T>&>(Parent::my_cont).tableau.size() == 0){ 00086 t = &(static_cast<ContenerTableau<T>&>(Parent::my_cont).NULL_ELEM); 00087 Parent::end_flag = true; 00088 } 00089 else 00090 t = tab_parcours[index_courant]; 00091 return *t; 00092 }
| T& IteratorTableau< T >::GetNext | ( | ) | [inline] |
get next item in course
Reimplemented from Iterator< T, IteratorTableau< T > >.
Definition at line 94 of file iterator_array.h.
Referenced by FormeFaible< DomainA, DomainC, Dim >::ApplyAtomsCorrection(), FormeFaible< DomainA, DomainC, Dim >::BuildAtomsRHS(), Bridging< DomainA, DomainC, Dim, Pond >::BuildAtomsWeight(), BelytschkoFull< DomainA, DomainC, Dim >::BuildConstraintMatrix(), FormeFaible< DomainA, DomainC, Dim >::BuildContinuConstraintMatrix(), LeastSquare< DomainA, DomainC, Dim >::BuildLeastSquareRHS(), BridgingPar< DomainA, DomainC, Dim, Pond >::CorrectSurfaceEffect(), FormeFaible< DomainA, DomainC, Dim >::CorrectWeights(), LeastSquare< DomainA, DomainC, Dim >::CorrigeAtoms(), Bridging< DomainA, DomainC, Dim, Pond >::Dump(), FiltreAtom< Domain, Dim >::GetNext(), FiltreMesh< Domain, Dim >::GetNextElem(), and FiltreMesh< Domain, Dim >::GetNextNode().
00094 { 00095 index_courant ++; 00096 00097 if(index_courant >= index_fin){ 00098 --index_courant; 00099 IteratorTableau<T>::end_flag = true; 00100 } 00101 return *tab_parcours[index_courant]; 00102 }
int IteratorTableau< T >::index_courant [private] |
current index in course
Definition at line 107 of file iterator_array.h.
Referenced by IteratorTableau< RefElt >::GetFirst(), and IteratorTableau< RefElt >::GetNext().
int IteratorTableau< T >::index_debut [private] |
int IteratorTableau< T >::index_fin [private] |
last index in course
Definition at line 111 of file iterator_array.h.
Referenced by IteratorTableau< RefElt >::GetNext(), and IteratorTableau< RefElt >::IteratorTableau().
T IteratorTableau< T >::invalid_ref [private] |
T** IteratorTableau< T >::tab_parcours [private] |
pointer to avoid over-cost in using STL vector
Definition at line 116 of file iterator_array.h.
Referenced by IteratorTableau< RefElt >::GetFirst(), and IteratorTableau< RefElt >::GetNext().
1.5.2