53 static std::set<std::string>* packageNames_ = NULL;
56 void freePackageNames ()
58 if (packageNames_ != NULL) {
64 void createPackageNames ()
66 if (packageNames_ == NULL) {
67 packageNames_ =
new std::set<std::string> ();
72 (void) atexit (freePackageNames);
80 createPackageNames ();
82 (packageNames_ == NULL, std::logic_error,
"Trilinos::Details::"
83 "Impl::rememberRegisteredSomeLinearSolverFactory: "
84 "Should never get here! packageNames_ is NULL.");
86 std::pair<std::set<std::string>::iterator,
bool> ret =
87 packageNames_->insert (packageName);
94 createPackageNames ();
96 (packageNames_ == NULL, std::logic_error,
"Trilinos::Details::"
97 "Impl::rememberRegisteredSomeLinearSolverFactory: "
98 "Should never get here! packageNames_ is NULL.");
100 std::set<std::string>::const_iterator it = packageNames_->find (packageName);
101 return it != packageNames_->end ();
106 #if defined(TRILINOS_HAVE_LINEAR_SOLVER_FACTORY_REGISTRATION)
108 #else // NOT defined(TRILINOS_HAVE_LINEAR_SOLVER_FACTORY_REGISTRATION)
110 #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".