HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_DopParent.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: OP_DopParent.h ( SIM Library, C++)
7  *
8  * COMMENTS:
9  * This provides a bridge up to DOP_Parent for methods interested
10  * in the simulation status but live below SIM.
11  * Note that these are NOT necessarily DOP_Parents! This is used
12  * by any DOP_Parent-like cache node.
13  *
14  * NOTE: Creating/destryoing these is NOT threadsafe as they
15  * have global registry :<
16  */
17 
18 #ifndef __OP_DopParent__
19 #define __OP_DopParent__
20 
21 #include "OP_API.h"
22 #include "OP_DataTypes.h"
23 #include <SYS/SYS_Types.h>
24 #include <UT/UT_VectorTypes.h>
25 #include <DEP/DEP_MicroNode.h>
26 
27 class OP_Node;
28 template <typename T> class UT_Array;
29 
32 
33 
35 {
36 public:
38  : myDopParentNode(dopparentnode)
39  { }
40 
41  const char *className() const override
42  { return "OP_DopParentMicroNode"; }
44  { return myDopParentNode; }
45 
46 private:
47  OP_Node *myDopParentNode;
48 };
49 
51 {
52 public:
53  OP_DopParent();
54  virtual ~OP_DopParent();
55 
56  /// This static function returns an array of all DOP_Parents.
57  static const DOP_ParentList &getAllDopParents();
58 
59  /// This function moves a particular DOP_Parent to the front of the list
60  /// of all DOP_Parents. This lets us treat this list as a "most recently
61  /// used" stack.
62  static void setMostRecentDopParent(OP_DopParent *dopparent);
63 
64  virtual bool opGetNeedsResimulation() const = 0;
65  virtual bool opGetDisableSimulation() const = 0;
66  static OP_Node *opGetMostRecentDopOwner();
67  static OP_DopParent *opGetMostRecentDopParent();
68 
69  virtual OP_Node *opGetOwner() const = 0;
70 
71  virtual void opResimulate() = 0;
72  virtual void opSendResimulateNotification(
73  bool callnotify, bool changingguideparm) = 0;
74 
75  /// Checks to see if the dop is in play mode
76  virtual bool opIsPlayer() const = 0;
77  virtual void opResetPlayer() = 0;
78 
79  /// Returns if the operator is in Continous Cook mode.
80  virtual bool opIsContinuousCook() const = 0;
81  /// Current continuous cook tick.
82  virtual exint opContinuousCookTick() const = 0;
83 
84  /// Note this is in simulation frames, not global.
85  virtual bool opIsSimFrameCached(exint simframe) const = 0;
86 
87  virtual void setNeedsToCompletelyReset() = 0;
88 
89  // Returns global frames, not simulation frames, rounded outwards.
90  virtual void opGetDiskCache(UT_Array<int> &frames) const = 0;
91  virtual void opGetMemoryCache(UT_Array<int> &frames) const = 0;
92 
93  // Returns a set of nodes that are "extra inputs" to the simulation,
94  // through the simMicroNode.
95  virtual void opGetSimExtraInputNodes(OP_NodeList &extras) const = 0;
96 
97  virtual fpreal opGetLatestCacheTime() const = 0;
98 };
99 
100 
101 #endif // __OP_DopParent__
OP_Node * getDopParentNode() const
Definition: OP_DopParent.h:43
int64 exint
Definition: SYS_Types.h:125
const char * className() const override
Definition: OP_DopParent.h:41
UT_ValArray< OP_DopParent * > DOP_ParentList
Definition: OP_DopParent.h:30
fpreal64 fpreal
Definition: SYS_Types.h:278
#define OP_API
Definition: OP_API.h:10
OP_DopParentMicroNode(OP_Node *dopparentnode)
Definition: OP_DopParent.h:37