13 #ifndef SST_CORE_MODEL_ELEMENT_PYTHON_H
14 #define SST_CORE_MODEL_ELEMENT_PYTHON_H
18 #include <sst/core/eli/elementinfo.h>
22 typedef void* (*genPythonModuleFunction)(void);
37 std::string module_name;
67 module_name(module_name),
72 if ( filename ==
"" ) {
87 virtual void* load(
void* parent_module);
90 std::vector<SSTElementPythonModuleCode*> sub_modules;
130 std::string pylibrary;
131 std::string sstlibrary;
132 char* primary_module;
134 std::vector<std::pair<std::string,char*> > sub_modules;
143 SST_ELI_DECLARE_DEFAULT_INFO_EXTERN()
144 SST_ELI_DECLARE_CTOR_EXTERN(
const std::string&)
157 __attribute__ ((deprecated(
"Support for addPrimaryModule will be removed in version 9.0. Please use createPrimaryModule().")))
158 void addPrimaryModule(
char* file);
160 __attribute__ ((deprecated(
"Support for addPrimaryModule will be removed in version 9.0. Please use createPrimaryModule() to get an SSTElementPythonModuleCode object then use it's addSubModule() method.")))
161 void addSubModule(std::string name,
char* file);
163 virtual void* load();
181 genPythonModuleFunction func;
190 void* load()
override {
203 public Builder<SSTElementPythonModule,const std::string&>
213 genPythonModuleFunction func_;
219 #define SST_ELI_REGISTER_PYTHON_MODULE(cls,lib,version) \
220 SST_ELI_REGISTER_DERIVED(SST::SSTElementPythonModule,cls,lib,lib,ELI_FORWARD_AS_ONE(version),"Python module " #cls)
222 #endif // SST_CORE_MODEL_ELEMENT_PYTHON_H
std::string getFullModuleName()
Get the full name of the module.
Definition: element_python.cc:119
Definition: element_python.h:179
Definition: elementbuilder.h:163
Definition: elementbuilder.h:138
Class to represent the code that needs to be added to create the python module struture for the libra...
Definition: element_python.h:28
Definition: elementbuilder.h:12
SSTElementPythonModuleCode * createPrimaryModule(char *code=NULL, std::string filename="")
Create the top level python module (i.e.
Definition: element_python.cc:188
Base class for python modules in element libraries.
Definition: element_python.h:126
SSTElementPythonModuleCode * addSubModule(const std::string &module_name, char *code=NULL, std::string filename="")
Add a submodule to the module.
Definition: element_python.cc:87
Definition: elementbuilder.h:147