HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_JobScriptInfo.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_JOB_SCRIPT_INFO_H__
10 #define __PDG_JOB_SCRIPT_INFO_H__
11 
12 #include "PDG_API.h"
13 
14 #include <UT/UT_StringArray.h>
15 #include <UT/UT_StringHolder.h>
16 
17 class PDG_Service;
18 class UT_WorkBuffer;
19 
21 {
22 public:
23  /// Enumeration of possible command override types. By default, nodes
24  /// will be configured to use the standard command. But it's possible
25  /// to override the script or entire commandline in a specific node
26  /// instance
28  {
29  /// Use the default command or the one set by the node itself
31 
32  /// Use a custom script, but using the same interepreter and
33  /// script path as normal
35 
36  /// Use a fully custom command string
38  };
39 
40 public:
42 
43  void setScriptInfo(
44  const UT_StringHolder& module_name,
45  const UT_StringHolder& python_module,
46  const UT_StringHolder& extra_args);
47  void setServiceCompatibility(
48  const UT_StringArray& service_type_names);
49  void setServiceCompatibility(
50  const UT_StringHolder& service_type_name,
51  bool compatible);
52 
53  void setIsMainThread(bool is_main_thread)
54  { myIsMainThread = is_main_thread; }
55  void setIsNative(bool is_native)
56  { myIsNative = is_native; }
57  void setIsApplyWedges(bool apply_wedges)
58  { myIsApplyWedges = apply_wedges; }
59 
60  void setCommandOverride(
61  CommandType command_type,
62  const UT_StringHolder& custom);
63 
64  bool isServiceCompatible(
65  const UT_StringHolder& service_type_name) const;
66  bool isServiceCompatible(
67  const PDG_Service& service) const;
68 
69  void formatCommand(UT_WorkBuffer& buffer) const;
70  UT_StringHolder formatCommand() const;
71 
72  bool isStandardScript() const
73  { return myIsStandardScript; }
74  bool isMainThread() const
75  { return myIsMainThread; }
76  bool isNative() const
77  { return myIsNative; }
78  bool isApplyWedges() const
79  { return myIsApplyWedges; }
80 
81  const UT_StringHolder& moduleName() const
82  { return myModuleName; }
84  { return myPythonExecutable; }
85  const UT_StringHolder& extraArgs() const
86  { return myExtraArgs; }
88  { return myCustomCommand; }
90  { return myServiceTypeNames; }
91 
93  { return myCommandType; }
94 
95 private:
96  UT_StringHolder myModuleName;
97  UT_StringHolder myPythonExecutable;
98  UT_StringHolder myExtraArgs;
99  UT_StringHolder myCustomCommand;
100 
101  UT_StringArray myServiceTypeNames;
102 
103  CommandType myCommandType;
104 
105  bool myIsStandardScript;
106  bool myIsMainThread;
107  bool myIsNative;
108  bool myIsApplyWedges;
109 };
110 
111 #endif
CommandType commandType() const
bool isApplyWedges() const
bool isStandardScript() const
const UT_StringHolder & moduleName() const
Use a fully custom command string.
const UT_StringArray & serviceTypeNames() const
#define PDG_API
Definition: PDG_API.h:23
GLuint buffer
Definition: glcorearb.h:660
const UT_StringHolder & pythonExecutable() const
void setIsMainThread(bool is_main_thread)
const UT_StringHolder & extraArgs() const
void setIsApplyWedges(bool apply_wedges)
Use the default command or the one set by the node itself.
const UT_StringHolder & customCommand() const
void setIsNative(bool is_native)
bool isMainThread() const
bool isNative() const