| VRS - The Virtual Rendering System |
| version 3.3 |
00001 00002 #ifndef VRS_FINDPARENTSVISITOR_H__ 00003 #define VRS_FINDPARENTSVISITOR_H__ 00004 00005 00006 /********************************************************************** 00007 VRS - The Virtual Rendering System 00008 Copyright (C) 2001 Computer Graphics Systems Group at the 00009 Hasso-Plattner-Institute, Potsdam, Germany. 00010 This library is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU Lesser General Public 00012 License as published by the Free Software Foundation; either 00013 version 2.1 of the License, or (at your option) any later version. 00014 This library is distributed in the hope that it will be useful, but 00015 WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00017 See the GNU Lesser General Public License for more details. 00018 You should have received a copy of the GNU Lesser+ General Public 00019 License along with this library; if not, write to the FreeSoftware 00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA. 00021 **********************************************************************/ 00022 00023 #include <vrs/scenenodevisitor.h> 00024 00025 namespace VRS{ 00026 00027 template<class S> class SO; 00028 template<class S> class NonPersistentArray; 00029 template<class S> class Iterator; 00030 class SceneThing; 00031 00032 00033 class VRS_CORE_API FindParentsVisitor : public SceneNodeVisitor{ 00034 00035 public: 00036 00043 FindParentsVisitor(SO<SharedObj> child,bool findAll); 00044 00045 virtual TraversalFlag visitScene(SharedObj* obj, bool pushHint); 00046 00047 SO<Iterator<SO<SceneThing> > > getParents(); 00048 00049 private: 00050 SO<NonPersistentArray<SO<SceneThing> > > parents_; 00051 SO<SharedObj> child_; 00052 bool findAll_; 00053 }; 00054 00055 00056 } 00057 00058 #endif // VRS_FINDPARENTSVISITOR_H__ 00059