📄 wclistit.gml
字号:
.el .do begin
The &fn. returns a pointer to the list item at the current iterator
position.
.do end
:P.
.ITERATOR_UNDEFINED
In this case the
.MONO undef_item
.ix undef_item
exception is thrown, if enabled.
:RSLTS.
.if &lpref. eq Val .th .do begin
The value at the current iterator element is returned.
If the current element is undefined, a default initialized object is returned.
.do end
.el .do begin
A pointer to the current list element is returned.
If the current element is undefined,
:CMT. error returns for Isv and Ptr list iterators
. .if &lpref. eq Isv .th .do begin
NULL(0) is returned.
. .do end
. .el .do begin
an uninitialized pointer is returned.
. .do end
.do end
:SALSO.
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.operator~b+=
:SAL typ='fun'.operator~b--
:SAL typ='fun'.operator~b-=
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_item
:eSALSO.
:eLIBF.
.if '&lconst.' ne Const .do begin
:CMT.========================================================================
:LIBF cltype='WC&lpref.&lconst.DListIter<Type>' fmt='mfun' prot='public'.insert
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='insert'.int insert( &lparm. );
:eSNPL.
:SMTICS.
The &fn. inserts a new element into the list container object.
The new element is inserted before the current iterator item.
This process uses the previous link in the double linked list,
so the &fn. is not allowed with single linked lists.
:P.
.ITERATOR_UNDEFINED
The element is not inserted. If the
.MONO undef_iter
.ix undef_iter exception
exception is enabled, the exception is thrown.
.*
.if &lpref. ne Isv .th .do begin
:P.
If the insert fails and the
.MONO out_of_memory
.ix out_of_memory
exception is enabled in the list being iterated over, the exception is
thrown.
The list remains unchanged.
.do end
.*
:RSLTS.
The new element is inserted before the current iterator item. A TRUE value
(non-zero) is returned if the insert is successful. A FALSE (zero) result
is returned if the insert fails.
:SALSO.
:SAL typ='fun'.append
:SAL typ='omtyp' ocls='WCExcept'.out_of_memory
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
.do end
:CMT.========================================================================
:LIBF fmt='mfun' cllong='yes' prot='public'.operator ()
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='operator ()'.&lret. operator ()();
:eSNPL.
:SMTICS.
The &fn. is the call operator for the class.
The list element which follows the current item is set to be the new
current item.
If the previous current item was the last element in the list, the
iterator is positioned after the end of the list.
:P.
The &fn. has the same semantics as the pre-increment operator,
.MONO operator ++.
:P.
If the iterator was positioned before the first element in the list,
the current item will be set to the first element in the list.
If the list is empty, the iterator will be positioned after the end of
the list.
:P.
If the iterator is not associated with a list or the iterator
position before the increment was past the last element the list, the
.MONO undef_iter
.ix undef_iter exception
exception is thrown, if enabled.
:RSLTS
.if &lpref. eq Isv .th .do begin
The &fn. returns a pointer to the new current item.
NULL(0) is returned when the iterator is incremented past the end of the list.
.do end
.el .do begin
The &fn. returns a non-zero value if the iterator is positioned on a
list item.
Zero(0) is returned when the iterator is incremented past the end of the list.
.do end
:SALSO.
:SAL typ='fun'.operator~b++
:SAL typ='fun'.operator~b+=
:SAL typ='fun'.operator~b--
:SAL typ='fun'.operator~b-=
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' cllong='yes' prot='public'.operator ++
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='operator ++'.&lret. operator ++();
:eSNPL.
:SMTICS.
The &fn. is the pre-increment operator for the class.
The list element which follows the current item is set to be the new
current item.
If the previous current item was the last element in the list, the
iterator is positioned after the end of the list.
:P.
The &fn. has the same semantics as the call operator,
.MONO operator ().
:P.
If the iterator was positioned before the first element in the list,
the current item will be set to the first element in the list.
If the list is empty, the iterator will be positioned after the end of
the list.
:P.
If the iterator is not associated with a list or the iterator
position before the increment was past the last element the list, the
.MONO undef_iter
.ix undef_iter exception
exception is thrown, if enabled.
:RSLTS
.if &lpref. eq Isv .th .do begin
The &fn. returns a pointer to the new current item.
NULL(0) is returned when the iterator is incremented past the end of the list.
.do end
.el .do begin
The &fn. returns a non-zero value if the iterator is positioned on a
list item.
Zero(0) is returned when the iterator is incremented past the end of the list.
.do end
:SALSO.
:SAL typ='fun'.current
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b+=
:SAL typ='fun'.operator~b--
:SAL typ='fun'.operator~b-=
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' cllong='yes' prot='public'.operator +=
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='operator +='.&lret. operator +=( int );
:eSNPL.
:SMTICS.
The &fn. accepts an integer value that causes the iterator
to move that many elements after the current item.
If the iterator was positioned before the first element in the list, the
operation will set the current item to be the given element in the list.
:P.
If the current item was after the last element in the list previous to
the iteration, and the
.MONO undef_iter
.ix undef_iter exception
exception is enabled, the exception will be thrown.
Attempting to increment the iterator
position more than element after the end of the list, or by less than one
element causes the
.MONO iter_range
.ix iter_range exception
exception to be thrown, if enabled.
:RSLTS
.if &lpref. eq Isv .th .do begin
The &fn. returns a pointer to the new current item.
NULL(0) is returned when the iterator is incremented past the end of the list.
.do end
.el .do begin
The &fn. returns a non-zero value if the iterator is positioned on a
list item.
Zero(0) is returned when the iterator is incremented past the end of the list.
.do end
:SALSO.
:SAL typ='fun'.current
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.operator~b--
:SAL typ='fun'.operator~b-=
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.iter_range
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF cltype='WC&lpref.&lconst.DListIter<Type>' fmt='mfun' prot='public'.operator --
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='operator --'.&lret. operator --();
:eSNPL.
:SMTICS.
The &fn. is the pre-decrement operator for the class.
The list element previous to the current item is set to be the
new current item.
If the current item was the first element in the list,
the iterator is positioned before the first element in the list.
If the list is empty, the iterator will be positioned before the start
of the list.
:P.
If the iterator was positioned after the last element in the list,
the current item will be set to the last element.
:P.
If the iterator is not associated with a list or the iterator
position previous to the decrement was before the first element the list, the
.MONO undef_iter
.ix undef_iter exception
exception is thrown, if enabled.
:RSLTS
.if &lpref. eq Isv .th .do begin
The &fn. returns a pointer to the new current item.
NULL(0) is returned
.do end
.el .do begin
The &fn. returns a non-zero value if the iterator is positioned on a
list item.
Zero(0) is returned
.do end
when the iterator is decremented past the first element of the list.
:SALSO.
:SAL typ='fun'.current
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.operator~b+=
:SAL typ='fun'.operator~b-=
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF cltype='WC&lpref.&lconst.DListIter<Type>' fmt='mfun' prot='public'.operator -=
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='operator -='.&lret. operator -=( int );
:eSNPL.
:SMTICS.
The &fn. accepts an integer value that causes the iterator
to move that many elements before the current item.
If the iterator was positioned after the last element in the list, the
operation will set the current item to be the given number of elements from
the end of the list.
:P.
If the current item was before the first element in the list previous to
the iteration, and the
.MONO undef_iter
.ix undef_iter exception
exception is enabled, the exception will be thrown.
Attempting to decrement the iterator position more than one element before
the beginning of the list, or by less than one element causes the
.MONO iter_range
.ix iter_range exception
exception to be thrown, if enabled.
:RSLTS
.if &lpref. eq Isv .th .do begin
The &fn. returns a pointer to the new current item.
NULL(0) is returned
.do end
.el .do begin
The &fn. returns a non-zero value if the iterator is positioned on a
list item.
Zero(0) is returned
.do end
when the iterator is decremented past the first element in the list.
:SALSO.
:SAL typ='fun'.current
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.operator~b+=
:SAL typ='fun'.operator~b--
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.iter_range
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.reset
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='reset' .void reset();
:eSNPL.
:SMTICS.
The &fn. resets the iterator to the initial state, positioning the iterator
before the first element in the associated list.
:RSLTS
The iterator is positioned before the first list element.
:SALSO.
:SAL typ='fun'.WC&lpref.&lconst.SListIter
:SAL typ='fun'.WC&lpref.&lconst.DListIter
:SAL typ='fun'.container
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.reset
:SNPL.
:SNPFLF .#include <wclistit.h>
:SNPFLF .public:
:SNPF index='reset' .void WC&lpref.&lconst.SListIter<Type>::reset( &lcparam.WC&lpref.SList<Type> & );
:SNPF index='reset' .void WC&lpref.&lconst.DListIter<Type>::reset( &lcparam.WC&lpref.DList<Type> & );
:eSNPL.
:SMTICS.
The &fn. resets the iterator to operate on the specified list.
The iterator is positioned before the first element in the list.
:RSLTS
The iterator is positioned before the first element of the specified list.
:SALSO.
:SAL typ='fun'.WC&lpref.&lconst.SListIter
:SAL typ='fun'.WC&lpref.&lconst.DListIter
:SAL typ='fun'.container
:eSALSO.
:eLIBF.
.*
.DM ITERATOR_UNDEF DELETE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -