diff options
author | chatty | 1993-07-27 14:05:51 +0000 |
---|---|---|
committer | chatty | 1993-07-27 14:05:51 +0000 |
commit | a3cc6f71682fad4bdf8124ef427c325993b47f27 (patch) | |
tree | 538dc399e097412d56a2fbc74e6c299b0498057a /utils/DList.cc | |
parent | 05dd12ba660765cad6cb2955e80daad3f54d9918 (diff) | |
download | ivy-league-a3cc6f71682fad4bdf8124ef427c325993b47f27.zip ivy-league-a3cc6f71682fad4bdf8124ef427c325993b47f27.tar.gz ivy-league-a3cc6f71682fad4bdf8124ef427c325993b47f27.tar.bz2 ivy-league-a3cc6f71682fad4bdf8124ef427c325993b47f27.tar.xz |
Changes in documentation
Diffstat (limited to 'utils/DList.cc')
-rw-r--r-- | utils/DList.cc | 163 |
1 files changed, 156 insertions, 7 deletions
diff --git a/utils/DList.cc b/utils/DList.cc index 96a2db8..711a32c 100644 --- a/utils/DList.cc +++ b/utils/DList.cc @@ -430,13 +430,14 @@ CcuDList :: RemoveAfter (const CcuDListIter& li) Remove the element pointed at by the iterator \var{li}. If \var{li} points before the beginning of the list, or has reached its end, the return value is null, and the status flag is set to \var{TooEarly} -{resp. \var{TooFar}). In all other cases, \var{li} is rewinded by one step, +(resp. \var{TooFar}). In all other cases, \var{li} is rewinded by one step, in order to allow such loops as: +\begin{ccode} CcuDListIter li (l); - while (++li) { + while (++li) if (do_remove (*li)) l.RemoveAt (l); - } +\end{ccode} ?*/ CcuDListItem* CcuDList :: RemoveAt (CcuDListIter& li) @@ -461,11 +462,17 @@ CcuDList :: RemoveAt (CcuDListIter& li) #ifdef DOC +/*?class CcuDListIter +The class \typ{CcuDListIter} allows iterations on lists. +Several iterators may be used at a time on the same list. It is dangerous to modify +a list that is being iterated. +?*/ + /*? Initialize an iterator associated to the list \var{l}. That iterator will point at the beginning of the list, {\em before} the first element. ?*/ -CcuDListIter :: CcuDListIter (CcuDList& l) +CcuDListIter :: CcuDListIter (const CcuDList& l) { } @@ -478,14 +485,20 @@ CcuDListIter :: GetStatus () const { } +/*?nextdoc?*/ +void +CcuDListIter :: Reset () +{ +} + /*? -Reset an iterator to the beginning of the list. +Reset an iterator to the beginning (resp. the end) of the list. ?*/ void -CcuDListIter :: Reset () +CcuDListIter :: GotoEnd () { } -#endif +#endif /* DOC */ /*? @@ -575,3 +588,139 @@ CcuDListIter :: FindBack (CcuDListItem* e) return 0; } +#ifdef DOC + +/*?class CcuDListOf +The generic classes \typ{CcuDListOf} and \typ{CcuDListIterOf} are derived classes +of \typ{CcuDList} and \typ{CcuDListIter} that provide lists of pointers to class objects. +When parameterized by the class \typ{ITEM}, the following functions are redefined: +?*/ + +/*?nextdoc?*/ +CcuDListOf :: CcuDListOf (ITEM* it) +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListOf :: First () +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListOf :: Last () +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListOf :: Nth (int n) +{ +} + +/*?nextdoc?*/ +int +CcuDListOf :: Find (ITEM* it) const +{ +} + +/*?nextdoc?*/ +void +CcuDListOf :: Append (ITEM* it) +{ +} + +/*?nextdoc?*/ +void +CcuDListOf :: Prepend (ITEM* it) +{ +} + +/*?nextdoc?*/ +CcuDListOf& +CcuDListOf :: operator << (ITEM* it) +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListOf :: RemoveFirst () +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListOf :: RemoveLast () +{ +} + +/*?nextdoc?*/ +int +CcuDListOf :: Remove (ITEM* it, int nb = 1) +{ +} + +/*?nextdoc?*/ +int +CcuDListOf :: Remove (int (*p) (ITEM*), int nb = 1) +{ +} + +/*?nextdoc?*/ +void +CcuDListOf :: InsertAfter (const CcuDListIterOf <ITEM>& li, ITEM*it) +{ +} + +/*?nextdoc?*/ +void +CcuDListOf :: InsertBefore (const CcuDListIterOf <ITEM>& li, ITEM* it) +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListOf :: RemoveAfter (const CcuDListIterOf <ITEM>& li) +{ +} + +/*? +These functions are equivalent to their homonyms in the class \typ{CcuDList}, +except that they are customized in order to manipulate pointers to \typ{ITEM} +instead of \typ{void*}. +?*/ +ITEM* +CcuDListOf :: RemoveAt (CcuDListIterOf <ITEM>& li) +{ +} + +/*?nextdoc?*/ +CcuDListIterOf :: CcuDListIterOf (const CcuDListOf <ITEM>& l) +{ +} + +/*?nextdoc?*/ +ITEM* +CcuDListIterOf :: operator * () const +{ +} + +/*?nextdoc?*/ +int +CcuDListIterOf :: Find (ITEM* it) +{ +} + +/*? +These functions are equivalent to their homonyms in the class \typ{CcuDListIter}, +except that they are customized in order to manipulate pointers to \typ{ITEM} +instead of \typ{void*}. +?*/ +int +CcuDListIterOf :: FindBack (ITEM* it) +{ +} + + +#endif /* DOC */ |