⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wchiter.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 2 页
字号:
exception is enabled, the exception is thrown.
:RSLTS.
A pointer to the hash object associated with the iterator is returned,
or NULL(0) if the iterator has not been initialized with a hash.
:SALSO.
:SAL typ='fun'.&clfnm_cl2.
.if '&clfnm_cl1.' ne '' .th .do begin
:SAL typ='fun'.&clfnm_cl1.
.do end
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.

.if '&clfnm_cl1.' ne '' .th .do begin
.if &lpref. eq Val .th .do begin
.se lret='Type '
.do end
.el .do begin
.se lret='Type *'
.do end
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.current
:SNPL.
:SNPFLF          .#include <wchiter.h>
:SNPFLF          .public:
:SNPF index='current'.&lret.current();
:eSNPL.
:SMTICS.
.if &lpref. eq Val .th .do begin
The &fn. returns the value of the hash element at the current iterator
position.
.do end
.el .do begin
The &fn. returns a pointer to the hash 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 iterator element is returned.
If the current element is undefined,
NULL(0) is returned.
.do end
:SALSO.
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_item
:eSALSO.
:eLIBF.
.do end

.if '&clfnm_cl1.' eq '' .th .do begin
.if &lpref. eq Val .th .do begin
.se lret='Key '
.do end
.el .do begin
.se lret='Key *'
.do end
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.key
:SNPL.
:SNPFLF          .#include <wchiter.h>
:SNPFLF          .public:
:SNPF index='key'.&lret.key();
:eSNPL.
:SMTICS.
.if &lpref. eq Val .th .do begin
The &fn. returns the value of
.MONO Key
at the current iterator position.
.do end
.el .do begin
The &fn. returns a pointer to the
.MONO Key
value of the hash 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 of
.MONO Key
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
.MONO Key
at the current iterator element is returned.
If the current element is undefined,
an undefined pointer is returned.
.do end
:SALSO.
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_item
:eSALSO.
:eLIBF.
.do end

:CMT.========================================================================
:LIBF fmt='mfun' cllong='yes' prot='public'.operator ()
:SNPL.
:SNPFLF          .#include <wchiter.h>
:SNPFLF          .public:
:SNPF index='operator ()'.int operator ()();
:eSNPL.
:SMTICS.
The &fn. is the call operator for the class.
The hash 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
hash, the iterator is positioned after the end of the hash.
:P.
The &fn. has the same semantics as the pre-increment operator,
.MONO operator ++.
:P.
If the iterator was positioned before the first hash element,
the current item will be set to the first element.
If the hash is empty, the iterator will be positioned after the end of
the hash.
:P.
If the iterator is not associated with a hash or the iterator
position before the increment was past the last element the hash, the
.MONO undef_iter
.ix undef_iter exception
exception is thrown, if enabled.
:RSLTS
The &fn. returns a non-zero value if the iterator is positioned on a
hash item.
Zero(0) is returned when the iterator is incremented past the end of the hash.
:SALSO.
: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 <wchiter.h>
:SNPFLF          .public:
:SNPF index='operator ++'.int operator ++();
:eSNPL.
:SMTICS.
The &fn. is the pre-increment operator for the class.
The hash 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 hash,
the iterator is positioned after the end of the hash.
:P.
The &fn. has the same semantics as the call operator,
.MONO operator ().
:P.
The current item will be set to the first hash element
if the iterator was positioned before the first element in the hash.
If the hash is empty, the iterator will be positioned after the end of
the hash.
:P.
If the iterator is not associated with a hash or the iterator
position before the increment was past the last element the hash, the
.MONO undef_iter
.ix undef_iter exception
exception is thrown, if enabled.
:RSLTS
The &fn. returns a non-zero value if the iterator is positioned on a
hash item.
Zero(0) is returned when the iterator is incremented past the end of the hash.
:SALSO.
.if '&clfnm_cl1.' ne '' .th .do begin
:SAL typ='fun'.current
.do end
:SAL typ='fun'.operator~b()
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_iter
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.reset
:SNPL.
:SNPFLF          .#include <wchiter.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 hash.
:RSLTS
The iterator is positioned before the first hash element.
:SALSO.
:SAL typ='fun'.&clfnm_cl2.
.if '&clfnm_cl1.' ne '' .th .do begin
:SAL typ='fun'.&clfnm_cl1.
.do end
:SAL typ='fun'.container
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.reset
:SNPL.
:SNPFLF          .#include <wchiter.h>
:SNPFLF          .public:
.if '&clfnm_cl1.' eq '' .th .do begin
:SNPF index='reset'    .void reset( &clobj_cl2.&tmplat. & );
.do end
.el .do begin
:SNPF index='reset'    .void &clfnm_cl2.&tmplat.::reset( &clobj_cl2.&tmplat. & );
:SNPF index='reset'    .void &clfnm_cl1.&tmplat.::reset( &clobj_cl1.&tmplat. & );
.do end
:eSNPL.
:SMTICS.
The &fn. resets the iterator to operate on the specified hash.
The iterator is positioned before the first element in the hash.
:RSLTS
The iterator is positioned before the first element of the specified hash.
:SALSO.
:SAL typ='fun'.&clfnm_cl2.
.if '&clfnm_cl1.' ne '' .th .do begin
:SAL typ='fun'.&clfnm_cl1.
.do end
:SAL typ='fun'.container
:eSALSO.
:eLIBF.

.if '&clfnm_cl1.' eq '' .th .do begin
.if &lpref. eq Val .th .do begin
.se lret='Value '
.do end
.el .do begin
.se lret='Value *'
.do end
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.value
:SNPL.
:SNPFLF          .#include <wchiter.h>
:SNPFLF          .public:
:SNPF index='value'.&lret.value();
:eSNPL.
:SMTICS.
.if &lpref. eq Val .th .do begin
The &fn. returns the value of
.MONO Value
at the current iterator position.
.do end
.el .do begin
The &fn. returns a pointer to the
.MONO Value
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 of the
.MONO 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
.MONO Value
at the current iterator element is returned.
If the current element is undefined,
an undefined pointer is returned.
.do end
:SALSO.
:SAL typ='fun'.operator~b()
:SAL typ='fun'.operator~b++
:SAL typ='fun'.reset
:SAL typ='omtyp' ocls='WCIterExcept'.undef_item
:eSALSO.
:eLIBF.
.do end

.*
.DM ITERATOR_UNDEF DELETE

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -