Inheritance diagram for IIter:
Public Methods | |
virtual bool | next (T &objOut)=0 |
virtual void | reset ()=0 |
extern OA_PLUGIN_DLL_API const Guid IID_IBaseIter; typedef IIterThis 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:IBaseIter;
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 IIterThen an example of client code using this interface would be:IFooIter;
IFooIter *it = someContainer->getItems(); IFoo *obj; while (it->next(obj)) { obj->doStuff(); obj->release(); }
|
This function is used to get the next element in the iteration. The iterator advances its internal state to point to the next element, and passes it back out via the objOut parameter. If there are no more objects in the collection this function returns false. Note that it returns true for the last element, and that a false return value indicates that nothing was assigned to objOut.
|
|
This function resets the iterators internal state to point to the beginning of the set of elements. |
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.