HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PY_EvaluationContext.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  * This class represents an evaluation context in which pieces of compiled
8  * python code can run. Each evaluation context contains a globals
9  * dict, so it effectively acts as a namespace.
10  */
11 
12 #ifndef __PY_EvaluationContext_h__
13 #define __PY_EvaluationContext_h__
14 
15 #include "PY_API.h"
16 #include <UT/UT_String.h>
17 
19 {
20 public:
21  explicit PY_EvaluationContext(const char* default_module="hou");
23 
24  void clear();
25 
27  { return myOpaqueGlobalsDict; }
28 
29 private:
30  PY_EvaluationContext(const PY_EvaluationContext &); // unimplemented
31 
32  void initializeContents();
33 
34  friend class PY_CompiledCode;
35 
36  void *myOpaqueGlobalsDict;
37  UT_String myDefaultModule;
38 };
39 
40 #endif
#define PY_API
Definition: PY_API.h:10