![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SOSEARCHACTION_H 00002 #define COIN_SOSEARCHACTION_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) by Kongsberg Oil & Gas Technologies. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Kongsberg Oil & Gas Technologies 00018 * about acquiring a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/actions/SoAction.h> 00028 #include <Inventor/actions/SoSubAction.h> 00029 #include <Inventor/tools/SbLazyPimplPtr.h> 00030 #include <Inventor/SbName.h> 00031 #include <Inventor/lists/SoPathList.h> 00032 00033 class SoSearchActionP; 00034 00035 class COIN_DLL_API SoSearchAction : public SoAction { 00036 typedef SoAction inherited; 00037 00038 SO_ACTION_HEADER(SoSearchAction); 00039 00040 public: 00041 static void initClass(void); 00042 00043 SoSearchAction(void); 00044 virtual ~SoSearchAction(void); 00045 00046 enum LookFor { NODE = 1, TYPE = 2, NAME = 4 }; 00047 enum Interest { FIRST, LAST, ALL }; 00048 00049 void setNode(SoNode * const node); 00050 SoNode * getNode(void) const; 00051 void setType(const SoType type, const SbBool chkderived = TRUE); 00052 SoType getType(SbBool & chkderived) const; 00053 void setName(const SbName name); 00054 SbName getName(void) const; 00055 void setFind(const int what); 00056 int getFind(void) const; 00057 void setInterest(const Interest interest); 00058 Interest getInterest(void) const; 00059 void setSearchingAll(const SbBool searchall); 00060 SbBool isSearchingAll(void) const; 00061 SoPath * getPath(void) const; 00062 SoPathList & getPaths(void); 00063 void reset(void); 00064 00065 void setFound(void); 00066 SbBool isFound(void) const; 00067 void addPath(SoPath * const path); 00068 00069 // Obsoleted global flag, only present for compatibility reasons 00070 // with old SGI / TGS Inventor application code. 00071 static SbBool duringSearchAll; 00072 00073 protected: 00074 virtual void beginTraversal(SoNode * node); 00075 00076 private: 00077 int lookfor; 00078 Interest interest; 00079 SbBool searchall, chkderived; 00080 SoNode * node; 00081 SoType type; 00082 SbName name; 00083 SoPath * path; 00084 SoPathList paths; 00085 00086 private: 00087 SbLazyPimplPtr<SoSearchActionP> pimpl; 00088 00089 // NOT IMPLEMENTED: 00090 SoSearchAction(const SoSearchAction & rhs); 00091 SoSearchAction & operator = (const SoSearchAction & rhs); 00092 }; // SoSearchAction 00093 00094 #endif // !COIN_SOSEARCHACTION_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Thu Apr 28 2011 03:43:06 for Coin by Doxygen 1.7.4.