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:
24 
25  void setScriptInfo(
26  const UT_StringHolder& module_name,
27  const UT_StringHolder& python_module,
28  const UT_StringHolder& extra_args);
29  void setServiceCompatibility(
30  const UT_StringArray& service_type_names);
31  void setServiceCompatibility(
32  const UT_StringHolder& service_type_name,
33  bool compatible);
34 
35  void setIsMainThread(bool is_main_thread)
36  { myIsMainThread = is_main_thread; }
37  void setIsNative(bool is_native)
38  { myIsNative = is_native; }
39 
40  bool isServiceCompatible(
41  const UT_StringHolder& service_type_name) const;
42  bool isServiceCompatible(
43  const PDG_Service& service) const;
44 
45  void formatCommand(UT_WorkBuffer& buffer) const;
46  UT_StringHolder formatCommand() const;
47 
48  bool isStandardScript() const
49  { return myIsStandardScript; }
50  bool isMainThread() const
51  { return myIsMainThread; }
52  bool isNative() const
53  { return myIsNative; }
54 
55  const UT_StringHolder& moduleName() const
56  { return myModuleName; }
58  { return myPythonExecutable; }
59  const UT_StringHolder& extraArgs() const
60  { return myExtraArgs; }
62  { return myServiceTypeNames; }
63 
64 private:
65  UT_StringHolder myModuleName;
66  UT_StringHolder myPythonExecutable;
67  UT_StringHolder myExtraArgs;
68  UT_StringArray myServiceTypeNames;
69 
70  bool myIsStandardScript;
71  bool myIsMainThread;
72  bool myIsNative;
73 };
74 
75 #endif
bool isStandardScript() const
const UT_StringHolder & moduleName() const
const UT_StringArray & serviceTypeNames() const
#define PDG_API
Definition: PDG_API.h:23
const UT_StringHolder & pythonExecutable() const
Definition: core.h:760
void setIsMainThread(bool is_main_thread)
const UT_StringHolder & extraArgs() const
void setIsNative(bool is_native)
bool isMainThread() const
bool isNative() const