00001 #ifndef COIN_SONODEKITPATH_H
00002 #define COIN_SONODEKITPATH_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <Inventor/SoPath.h>
00028
00029 class SoNode;
00030 class SoBaseKit;
00031 class SoSearchAction;
00032
00033 class COIN_DLL_API SoNodeKitPath : public SoPath {
00034 typedef SoPath inherited;
00035
00036 public:
00037 int getLength(void) const;
00038 SoNode * getTail(void) const;
00039 SoNode * getNode(const int idx) const;
00040 SoNode * getNodeFromTail(const int idx) const;
00041 void truncate(const int length);
00042 void pop(void);
00043 void append(SoBaseKit * childKit);
00044 void append(const SoNodeKitPath * fromPath);
00045 SbBool containsNode(SoBaseKit * node) const;
00046 int findFork(const SoNodeKitPath * path) const;
00047
00048 friend COIN_DLL_API int operator==(const SoNodeKitPath & p1, const SoNodeKitPath & p2);
00049
00050 protected:
00051 SoNodeKitPath(const int approxLength);
00052 virtual ~SoNodeKitPath();
00053
00054 private:
00055
00056 static void clean(void);
00057 static SoSearchAction *searchAction;
00058 SoSearchAction *getSearchAction(void);
00059
00060
00061 void append(const int childIndex);
00062 void append(SoNode *childNode);
00063 void append(const SoPath *fromPath);
00064 void push(const int childIndex);
00065 int getIndex(const int i) const;
00066 int getIndexFromTail(const int i) const;
00067 void insertIndex(SoNode *parent,const int newIndex);
00068 void removeIndex(SoNode *parent,const int oldIndex);
00069 void replaceIndex(SoNode *parent,const int index,SoNode *newChild);
00070 };
00071
00072 COIN_DLL_API int operator==(const SoNodeKitPath & p1, const SoNodeKitPath & p2);
00073
00074 #endif // !COIN_SONODEKITPATH_H