2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: collectionIterator.h /main/3 1996/06/11 17:28:33 cde-hal $ */
25 #ifndef _collection_iterator_h
26 #define _collection_iterator_h 1
28 #include "api/info_base.h"
29 #include "object/cset.h"
31 // collectionIterator iterates over MMDB's cset objects through
34 class collectionIterator
37 collectionIterator(info_base*, int set_position);
38 virtual ~collectionIterator();
40 // advance the iterator to the next position.
41 // A newly constructed iterator's position is
42 // undefined. This operator must be called to
43 // advance to the 1st position.
45 // return 1 if advance successful and 0 otherwize.
46 virtual unsigned int operator++() ;
49 oid_t get_oid(int index);
52 cset_handler* f_set_ptr;
57 // iterator over node set
58 class nodeCollectionIterator : public collectionIterator
62 nodeCollectionIterator(info_base*);
63 ~nodeCollectionIterator();
65 const char* get_locator();
68 // iterator over graphic set
69 class graphicCollectionIterator : public collectionIterator
73 graphicCollectionIterator(info_base*);
74 ~graphicCollectionIterator();
76 const char* get_locator();
79 // iterator over stylesheet set
80 class stylesheetCollectionIterator : public collectionIterator
84 stylesheetCollectionIterator(info_base*);
85 ~stylesheetCollectionIterator();
87 const char* get_locator();
90 // iterator over locator set
91 class locatorCollectionIterator : public collectionIterator
95 locatorCollectionIterator(info_base*);
96 ~locatorCollectionIterator();
98 const char* get_locator();