00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_OBJECTITERATOR_H
00012
#define OPENCAL_OBJECTITERATOR_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
00017
#include <vector>
00018
using std::vector;
00019
00020
00021
namespace OpenCAL
00022 {
00023
00024
class System;
00025
class Object;
00026
00031 class OPENCAL_API ObjectIterator
00032 {
00033
protected:
00034
00035
typedef vector<unsigned int> SystemStack;
00036
00037
00038
System *m_system;
00039
Object *m_currentObject;
00040
System *m_currentSystem;
00041 SystemStack m_systemStack;
00042
unsigned int m_objectIndex;
00043
00044
public:
00045
00046 ObjectIterator(
System *system);
00047
virtual ~ObjectIterator();
00048
00049
00050
00051
00052
00053
00054
00055 ObjectIterator &operator++();
00056
const ObjectIterator operator++(
int);
00057
Object *operator*() {
return m_currentObject; }
00058
Object *current() {
return m_currentObject; }
00059
00060
00061
void reset();
00062
00063
protected:
00064
00065
Object *gotoFirstObject(
System *system);
00066 };
00067 }
00068
00069
#endif // OPENCAL_OBJECTITERATOR_H