26 namespace lsst {
namespace base {
30 class PlaceholderModuleImporter :
public ModuleImporter {
32 static ModuleImporter
const * get() {
33 static PlaceholderModuleImporter
const instance;
37 PlaceholderModuleImporter() {}
39 virtual bool _import(
std::string const & name)
const {
return false; }
42 ModuleImporter
const * & getImporterSingleton() {
43 static ModuleImporter
const * instance = PlaceholderModuleImporter::get();
50 return getImporterSingleton()->_import(name);
54 getImporterSingleton() = importer;
Mechanism for safely importing Python modules from C++; should not be included except by its own impl...
Base class that defines an interface for importing Python modules.
static bool import(std::string const &name)
Import the given Python module, and return true if successful.