00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COIN_SOSTATE_H
00021 #define COIN_SOSTATE_H
00022
00023 #include <Inventor/SbBasic.h>
00024 #include <stdio.h>
00025
00026 class SoAction;
00027 class SoTypeList;
00028 class SoElement;
00029
00030 class COIN_DLL_API SoState {
00031 public:
00032 SoState(SoAction * action,
00033 const SoTypeList & enabledelements);
00034 ~SoState(void);
00035
00036 SoAction * getAction(void) const;
00037
00038 SoElement * getElement(const int stackindex);
00039 const SoElement * getConstElement(const int stackindex) const;
00040
00041 void push(void);
00042 void pop(void);
00043
00044 void print(FILE * const file = stdout) const;
00045
00046 SbBool isElementEnabled(const int stackindex) const;
00047
00048 int getDepth(void) const;
00049
00050 void setCacheOpen(const SbBool flag);
00051 SbBool isCacheOpen(void) const;
00052
00053 void lazyEvaluate(void) const;
00054
00055 SoElement * getElementNoPush(const int stackindex) const;
00056
00057 private:
00058 SoElement ** stack;
00059 class SoStateP * pimpl;
00060 };
00061
00062
00063 inline const SoElement *
00064 SoState::getConstElement(const int stackindex) const
00065 {
00066 return this->stack[stackindex];
00067 }
00068
00069 #endif // !COIN_SOSTATE_H