11 #ifndef __DOP_Parent_h__
12 #define __DOP_Parent_h__
23 template <
typename T>
class UT_Array;
43 {
return myDopParentUniqueId; }
45 void setNeedsToResimulateLastTimestep();
46 void setNeedsToFilterData();
66 bool getNeedsResimulation()
const;
69 const SIM_Time &getOffsetTime()
const;
71 fpreal getTimeScale()
const;
73 bool getAutoResimulation()
const;
74 void setAutoResimulation(
bool autoreset);
75 bool getInterpolateData(
const SIM_Time &
t)
const;
76 void setInterpolateData(
bool interpolate);
77 bool getIsSimulating()
const;
83 { mySimulating =
val; }
88 {
return myDisableSimulation; }
90 { myDisableSimulation = disable; }
96 void findAllObjectsFromString(
const char *objspec,
103 const SIM_Object *findObjectFromString(
const char *objspec,
104 int whichmatch,
int *nummatch,
110 void findAllRelationshipsFromString(
120 int whichmatch,
int *nummatch,
125 DOP_Node::DOP_CookData &getDopNodeCookData();
132 void sendResimulateNotification(
134 bool changingguideparm);
137 {
return getNonConstEngineSubclass().simMicroNode(); }
139 {
return getNonConstEngineSubclass().simInputMicroNode(); }
141 {
return getNonConstEngineSubclass().resimParmsMicroNode(); }
143 {
return getEngineSubclass().resimParmsMicroNode(); }
145 {
return getNonConstEngineSubclass().refilterParmsMicroNode(); }
147 {
return getEngineSubclass().refilterParmsMicroNode(); }
157 static void setMostRecentDopParent(
DOP_Parent *dopparent);
164 static OP_Node *getMostRecentDopOwner();
165 static OP_Node *getMostRecentWriteableDopOwner();
168 {
return getNeedsResimulation(); }
179 void updateResimParms(
const SIM_Time &
t);
182 const SIM_Time &getLastSetTime()
const;
183 void resimulateLastTimestep();
186 void setNeedsToFilterData(
const SIM_Time &
t);
188 void filterDataIfRequired()
const;
193 virtual const DOP_Engine &getEngineSubclass()
const = 0;
194 virtual void resimulateLastTimestepSubclass();
195 virtual void setDOPTimeSubclass(
const SIM_Time &
t);
196 virtual DOP_Engine &getNonConstEngineSubclass() = 0;
197 virtual void filterDataSubclass(
const SIM_Time &
t) = 0;
202 void notifySimulationChangeSinksOfChange();
203 void notifySimulationChangeSinksOfDelete();
207 DOP_Node::DOP_CookData myDopNodeCookData;
212 bool myNeedsToFilterData;
214 bool myNeedsToResimulateFrame;
215 bool myNeedsToResimulateCompletely;
216 bool myAutoResimulation;
217 bool myInterpolateData;
218 bool mySendingResimulateNotification;
219 bool myDisableSimulation;
220 int myDopParentUniqueId;
234 { removeAllSimulationChangeSinks(); }
236 virtual void simulationChanged(
DOP_Parent *dopparent) = 0;
238 { removeSimulationChangeSink(dopparent); }
243 if( !dopparent )
return;
244 dopparent->mySimulationChangeSinks.
append(
this, 1);
245 myDopParents.append(dopparent, 1);
249 if( !dopparent )
return;
251 myDopParents.findAndRemove(dopparent);
255 for(
int i = myDopParents.entries(); i --> 0; )
256 removeSimulationChangeSink(myDopParents(i));
bool getDisableSimulation() const
int dopparentUniqueId() const
void addSimulationChangeSink(DOP_Parent *dopparent)
virtual void simulationDeleted(DOP_Parent *dopparent)
virtual void setNeedsToCompletelyReset()=0
DOP_SimulationChangeSink()
exint findAndRemove(const S &s)
virtual bool opGetDisableSimulation() const =0
void removeAllSimulationChangeSinks()
void removeSimulationChangeSink(DOP_Parent *dopparent)
DEP_MicroNode & resimParmsMicroNode()
virtual void handleRefilterParms(const SIM_Time &t)
void setIsSimulating(bool val)
UT_ValArray< DOP_Parent * > DOP_ParentList
void setDisableSimulation(bool disable)
GA_API const UT_StringHolder scale
const DEP_MicroNode & refilterParmsMicroNode() const
virtual ~DOP_SimulationChangeSink()
virtual void handleResimParms(const SIM_Time &t)
virtual void opGetDiskCache(UT_Array< int > &frames) const =0
DEP_MicroNode & simMicroNode()
Holds pointers to a number of const SIM_Object objects.
virtual void opGetMemoryCache(UT_Array< int > &frames) const =0
virtual bool getIsTimeless() const
DEP_MicroNode & refilterParmsMicroNode()
bool opGetNeedsResimulation() const override
DEP_MicroNode & simInputMicroNode()
virtual void opGetSimExtraInputNodes(OP_NodeList &extras) const =0
const DEP_MicroNode & resimParmsMicroNode() const