Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ObjectIterator.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_OBJECTITERATOR_H 00012 #define OPENCAL_OBJECTITERATOR_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 00017 #include <vector> 00018 using std::vector; 00019 00020 00021 namespace OpenCAL 00022 { 00023 // Forward declarations 00024 class System; 00025 class Object; 00026 00031 class OPENCAL_API ObjectIterator 00032 { 00033 protected: 00034 // Typedefs 00035 typedef vector<unsigned int> SystemStack; 00036 00037 // Member variables 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 // Constructors and destructor 00046 ObjectIterator(System *system); 00047 virtual ~ObjectIterator(); 00048 00049 // Get functions 00050 00051 // Set functions 00052 00053 // Operator functions 00054 00055 ObjectIterator &operator++(); 00056 const ObjectIterator operator++(int); 00057 Object *operator*() { return m_currentObject; } 00058 Object *current() { return m_currentObject; } 00059 00060 // Other functions 00061 void reset(); 00062 00063 protected: 00064 // Protected functions 00065 Object *gotoFirstObject(System *system); 00066 }; 00067 } 00068 00069 #endif // OPENCAL_OBJECTITERATOR_H

Generated on Sun Aug 15 19:19:22 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8