IIter
模块: oapy._oa._common
导入: from oapy._oa import _common
概览
IIter 在 oapy 中可用,可通过 _common 模块访问。
本页汇总 IIter 当前在 oapy 中可用的 Python 接口。
详细说明
template class IIter< T, G > This is a templated abstract class for iterating generic collections。 The template parameter determines the type of object being served from the iterator。 Typically, a typedef is used to define a specific expansion of the interface following a declaration of that expansion's interface id。 The template does not have an id, since it does not define a specific expansion of the interface。 but it requires the id of the expansion to be passed in so that the getId function can be implemented。 For example: extern OA_PLUGIN_DLL_API const Guid IID_IBaseIter; typedef IIter IBaseIter; This defines the specific expansion and interface id of an iterator for the IBase interface pointer。 The implementor of an iterator, based on an expansion of IIter, can use any appropriate collection class as long as it can be accessed using an "iterator" or "enumerator" pattern。 For example, if the following interfaces are defined: class IFoo : public IBase { void doStuff() = 0; }; extern OA_PLUGIN_DLL_API const Guid IID_IFoo; extern OA_PLUGIN_DLL_API const Guid IID_IFooIter; typedef IIter IFooIter; Then an example of client code using this interface would be: IFooIter it = someContainer->getItems(); IFoo obj; while (it->next(obj)) { obj->doStuff(); obj->release(); }。
方法总览
| 状态 |
Python 调用 |
| ✅ |
obj.next(objOut) |
| ✅ |
obj.reset() |
方法说明
obj.next(objOut)
绑定状态: 已绑定
Python 调用: obj.next(objOut)
Python 示例
from oapy._oa import _common
# assume obj is a IIter
obj.next(objOut)
obj.reset()
绑定状态: 已绑定
Python 调用: obj.reset()
Python 示例
from oapy._oa import _common
# assume obj is a IIter
obj.reset()