21 static std::set<std::string>* packageNames_ = NULL;
24 void freePackageNames ()
26 if (packageNames_ != NULL) {
32 void createPackageNames ()
34 if (packageNames_ == NULL) {
35 packageNames_ =
new std::set<std::string> ();
40 (void) atexit (freePackageNames);
48 createPackageNames ();
50 (packageNames_ == NULL, std::logic_error,
"Trilinos::Details::"
51 "Impl::rememberRegisteredSomeLinearSolverFactory: "
52 "Should never get here! packageNames_ is NULL.");
54 std::pair<std::set<std::string>::iterator,
bool> ret =
55 packageNames_->insert (packageName);
62 createPackageNames ();
64 (packageNames_ == NULL, std::logic_error,
"Trilinos::Details::"
65 "Impl::rememberRegisteredSomeLinearSolverFactory: "
66 "Should never get here! packageNames_ is NULL.");
68 std::set<std::string>::const_iterator it = packageNames_->find (packageName);
69 return it != packageNames_->end ();
74 #if defined(TRILINOS_HAVE_LINEAR_SOLVER_FACTORY_REGISTRATION)
76 #else // NOT defined(TRILINOS_HAVE_LINEAR_SOLVER_FACTORY_REGISTRATION)
78 #endif // defined(TRILINOS_HAVE_LINEAR_SOLVER_FACTORY_REGISTRATION)
bool rememberRegisteredSomeLinearSolverFactory(const std::string &packageName)
Remember which packages registered at least one LinearSolverFactory, with any template parameters...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
bool registeredSomeLinearSolverFactory(const std::string &packageName)
Did the package with the given name register at least one LinearSolverFactory, with any template para...
bool haveLinearSolverFactoryRunTimeRegistration()
Whether the CMake run-time registration option is ON.
Declaration and definition of linear solver factory, and "factory of factories".