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