HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DOP_SolverPython.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  * NAME: DOP_SolverPython.h (DOP Library, C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __DOP_SolverPython_h__
13 #define __DOP_SolverPython_h__
14 
15 #include "DOP_API.h"
16 #include "DOP_AutoSolver.h"
17 #include <SIM/SIM_ObjectArray.h>
18 class DOP_ScriptOperator;
19 class OP_OTLDefinition;
20 
22 {
23 public:
24  static OP_Node *myConstructor(
25  OP_Network *net, const char *name, OP_Operator *entry);
26 
27  static DOP_ScriptOperator *createScriptOperator(const OP_OTLDefinition &);
28 
29  // These methods are called from within Python solver DOPs to get access
30  // to the solver data when copying from DOP parameters into solver data.
32  { return mySolverDataRootData; }
33  const char *solverDataPathFromRoot() const
34  { return mySolverDataPathFromRoot; }
35 
37  { return mySolverDataRootData != NULL; }
38 
39 protected:
40  DOP_SolverPython(OP_Network *net, const char *name, OP_Operator *entry);
41  ~DOP_SolverPython() override;
42 
44  SIM_Data &data, SIM_RootData &root_data, const char *data_name,
45  DOP_Engine &engine, int output_idx) override;
46 
47 private:
48  void runCodeToSetParmsOnData(
49  SIM_RootData &root_data, const char *data_name, int for_output_idx,
50  DOP_Engine &engine);
51 
52  SIM_RootData *mySolverDataRootData;
53  const char *mySolverDataPathFromRoot;
54  bool myIsRunning;
55 };
56 
57 #endif
#define DOP_API
Definition: DOP_API.h:10
const SIM_RootData * solverDataRootData() const
GLuint const GLchar * name
Definition: glcorearb.h:786
const char * solverDataPathFromRoot() const
bool isCopyingParametersToData() const
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
virtual void setAdditionalParametersOnDataSubclass(SIM_Data &data, SIM_RootData &root_data, const char *data_name, DOP_Engine &engine, int output_idx)
Definition: format.h:895