125 virtual void init(
SoState *state);
137 virtual SoElement* copyMatchInfo()
const;
141 static void initClass();
142 static void exitClass();
144 typedef std::bitset<SO_ELEMENT_MAX_KEY> ElementBitList;
155 static void pushElementSetters(
SoState* state, SoElementKeyType keyToPush);
156 static void popElementSetters(
SoState* state, SoElementKeyType keyToPop);
159 static void addNodeTraversalStart(
SoState* state);
168 static void clearGettersSetters(
SoState* state);
188 static void flagDelayedPath(
SoState* state);
196 SoRef<SoGroup> getDependencies(
const ElementBitList& elementKeys, std::vector<SoNode*>& dependencies)
const;
199 enum LazyEvaluationPolicy
206 inline void setLazyEvaluationPolicy(int32_t flag)
208 m_lazyEvaluationPolicy = flag;
209 if (!hasLazyEvaluation())
210 m_lazyEvaluationPolicy = DISABLED;
211 if (!isLazyEvaluationEnabled())
215 inline bool isLazyEvaluationEnabled()
const
217 return (m_lazyEvaluationPolicy & ENABLED) > 0;
220 inline bool isLazyEvaluationInherited()
const
222 return (m_lazyEvaluationPolicy & INHERITED) > 0;
230 bool needLazyEval()
const;
235 static void setLazyEvaluationPolicy(
SoState *state, int32_t lazyEvaluationPolicyFlag);
240 static void set(
SoState *state,
SoCache *cache, int32_t lazyEvaluationPolicyFlag);
246 static bool needTracking(
SoState *state);
249 static bool hasLazyEvaluation();
254 enum Type { PUSH, POP, ELEMENT, NODE_TRAVERSAL_START } ;
255 SoElementKeyType elementKey;
260 ElementInfos(SoElementKeyType elementKey,
SoNode* node, Type type)
262 this->elementKey = elementKey;
273 template<
typename Data>
281 m_lastSize.push( m_list.size() );
286 size_t lastSize = m_lastSize.top();
287 m_list.resize( lastSize );
291 std::stack<size_t> m_lastSize;
292 std::vector<Data> m_list;
296 typedef ListContainer<ElementInfos> ElementInfosListContainer;
298 typedef std::vector<ElementInfos> ElementInfosList;
301 const ElementInfosList& getElementSetters()
const {
return m_elementSetters->m_list; }
304 typedef ListContainer<SoNode*> LazyEvalNodesListContainer;
316 static const std::vector<uint64_t>& getLazyEvalNodesHashes(
const SoState* state );
323 SB_THREAD_TLS_HEADER();
347 std::vector<SoRef<LazyEvalNodesListContainer> > m_lazyEvalNodesLists;
350 std::vector<uint64_t> m_lazyEvalNodesHashes;
356 int32_t m_lazyEvaluationPolicy;