HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_CookState.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  * COMMENTS:
7  */
8 
9 #ifndef PDG_COOK_STATE_H
10 #define PDG_COOK_STATE_H
11 
12 #include "PDG_API.h"
13 
14 #include "PDG_CookOptions.h"
15 #include "PDG_Filter.h"
16 #include "PDG_NodeTypes.h"
17 #include "PDG_SchedulerTypes.h"
18 
19 #include <UT/UT_StringArray.h>
20 
21 class PDG_Graph;
22 class PDG_Scheduler;
23 class UT_WorkBuffer;
24 
25 /**
26  * Contains various state associated with a cook, e.g. the set of nodes being
27  * cooked, the fringe set, the filters, etc
28  */
30 {
31 public:
32  PDG_CookState();
33 
34  bool prepare(const PDG_Graph& graph,
35  const PDG_CookOptions& options,
36  PDG_Scheduler* default_scheduler,
37  const PDG_SchedulerArray& schedulers,
38  UT_WorkBuffer& errors);
39  void clear();
40 
41  const PDG_CookOptions& options() const
42  { return myOptions; }
44  { return myOptions; }
45 
46  bool isGenerateOnly() const;
47  bool isCook() const;
48 
50  { return myOptions.myCookType; }
51  const UT_StringArray& nodeNames() const
52  { return myOptions.myNodeNames; }
53 
54  bool autoRecook() const
55  { return myOptions.myAutoRecook; }
56  int autoRecookInterval() const
57  { return myOptions.myAutoRecookInterval; }
58  bool blocking() const
59  { return myOptions.myBlocking; }
60  const PDG_Filter& staticFilter() const
61  { return myOptions.myStaticFilter; }
62  fpreal cookTime() const
63  { return myOptions.myCookTime; }
64 
65  bool isSaveScene() const
66  { return myOptions.mySaveScene; }
67  bool isStaticCook() const
68  { return myIsStaticCook; }
69 
70  const PDG_NodeSet& cookSet() const
71  { return myCookSet; }
72  const PDG_NodeSet& leafSet() const
73  { return myLeafSet; }
74  const PDG_NodeSet& errorSet() const
75  { return myErrorSet; }
77  { return mySchedulers; }
78 
79  void incCookCount()
80  { myCookCount++; }
81  int cookCount() const
82  { return myCookCount; }
83 
84 private:
85  PDG_CookOptions myOptions;
86  PDG_NodeSet myCookSet;
87  PDG_NodeSet myLeafSet;
88  PDG_NodeSet myErrorSet;
89  PDG_SchedulerSet mySchedulers;
90  int myCookCount;
91  bool myIsStaticCook;
92 };
93 
94 #endif
const PDG_CookOptions & options() const
Definition: PDG_CookState.h:41
#define PDG_API
Definition: PDG_API.h:23
const PDG_NodeSet & leafSet() const
Definition: PDG_CookState.h:72
PDG_CookOptions::CookType cookType() const
Definition: PDG_CookState.h:49
const UT_StringArray & nodeNames() const
Definition: PDG_CookState.h:51
const PDG_SchedulerSet & schedulers() const
Definition: PDG_CookState.h:76
void incCookCount()
Definition: PDG_CookState.h:79
bool autoRecook() const
Definition: PDG_CookState.h:54
bool blocking() const
Definition: PDG_CookState.h:58
int cookCount() const
Definition: PDG_CookState.h:81
const PDG_Filter & staticFilter() const
Definition: PDG_CookState.h:60
const PDG_NodeSet & errorSet() const
Definition: PDG_CookState.h:74
const PDG_NodeSet & cookSet() const
Definition: PDG_CookState.h:70
bool isStaticCook() const
Definition: PDG_CookState.h:67
int autoRecookInterval() const
Definition: PDG_CookState.h:56
fpreal cookTime() const
Definition: PDG_CookState.h:62
bool isSaveScene() const
Definition: PDG_CookState.h:65
fpreal64 fpreal
Definition: SYS_Types.h:277
PDG_CookOptions & options()
Definition: PDG_CookState.h:43