Free Electron
CacheOp.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __houdini_CacheOp_h__
8 #define __houdini_CacheOp_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Store and reuse copies of the input
17 
18  @ingroup houdini
19 *//***************************************************************************/
20 class FE_DL_EXPORT CacheOp:
21  public OperatorSurfaceCommon,
22  public Initialize<CacheOp>
23 {
24  public:
25 
26  CacheOp(void);
27 virtual ~CacheOp(void);
28 
29  void initialize(void);
30 
31  //* As HandlerI
32 virtual void handle(Record& a_rSignal);
33 
34  void clearCache(void);
35 
36  private:
37 
38  class Stamp
39  {
40  public:
41  Stamp(void):
42  m_parmSerial(0),
43  m_feSerial(0),
44  m_upstreamChanges(0),
45  m_hit(FALSE) {}
46 
47  U64 m_parmSerial;
48  I32 m_feSerial;
49  I32 m_upstreamChanges;
50  BWORD m_hit;
51  String m_expressions;
52  String m_values;
53  };
54 
55  void reset(void);
56  I32 runScan(BWORD a_write);
57  I32 scan(OP_Node* a_pOpNode,BWORD a_write,BWORD a_rootNode);
58  String nodeSignature(OP_Node* a_pOpNode,BWORD a_valuesOnly);
59  void changeHoard(String a_hoard);
60  void changeGlobal(BWORD a_include);
61  void findHoardCaches(String a_hoard,BWORD a_clear);
62 
63  OP_Node* m_pThisOpNode;
64  String m_thisNodeParent;
65  Real m_lastFrame;
66  Real m_currentFrame;
67  Real m_poisonFrame;
68  Real m_time;
69  I32 m_cacheCount;
70  String m_currentHoard;
71  String m_blame;
72 
73  std::map<I32, sp<SurfaceAccessibleI> > m_frameCache;
74  std::map<String,Stamp> m_stampMap;
75 };
76 
77 } /* namespace ext */
78 } /* namespace fe */
79 
80 #endif /* __houdini_CacheOp_h__ */
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Store and reuse copies of the input.
Definition: CacheOp.h:20
Automatically reference-counted string container.
Definition: String.h:128
Partial Generic SurfaceI Implemention.
Definition: OperatorSurfaceCommon.h:20
Reference to an instance of a Layout.
Definition: RecordSB.h:35