Return to iterator_example.txt CVS log | Up to [Pegasus] / pegasus / doc |
File: [Pegasus] / pegasus / doc / Attic / iterator_example.txt
(download)
Revision: 1.2, Fri Jan 27 05:47:23 2006 UTC (18 years, 5 months ago) by karl Branch: MAIN CVS Tags: TASK-PEP362_RestfulService-merged_out_from_trunk, TASK-PEP348_SCMO-merged_out_from_trunk, TASK-PEP317_pullop-merged_out_from_trunk, TASK-PEP317_pullop-merged_in_to_trunk, TASK-PEP311_WSMan-root, TASK-PEP311_WSMan-branch, HPUX_TEST, HEAD Changes since 1.1: +0 -0 lines FILE REMOVED BUG#: 4706 TITLE: Delete files not longer desired in doc directory DESCRIPTION: Deleted the files listed in the bug |
Iterator "Study" ------------------------------------------------------------------------- Prsent Scheme ------------------------------------------------------------------------- CIMClass c; for (Uint32 i = 0; i < c.getNuProperties(); i++) { CIMProperty p = c.getProperty(i); } ------------------------------------------------------------------------- Scheme #1 (dependent iterator) ------------------------------------------------------------------------- CIMClass c; for (CIMProperty::Iterator i = c.firstProperty(); c.more(i); c.next(i)) { CIMProperty p = i.current(i); } ------------------------------------------------------------------------- Scheme #2 (independent iterator) ------------------------------------------------------------------------- CIMClass c; for (CIMClass::Iterator i = c.getProperties(); i.more(); i.next()) { Property p = i.current(); } ------------------------------------------------------------------------- Scheme #3 (independent iterator with operator overloading trickery) ------------------------------------------------------------------------- CIMClass c; for (CIMClass::Iterator i = c.getProperties(); i; i++) { Property p = *i; }
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |