Define a solver factory that instanciate the plug-ins. More...
#include <roboptim/core/solver-factory.hh>
Public Types | |
typedef S | solver_t |
Solver type. More... | |
typedef solver_t::problem_t | problem_t |
Problem type. More... | |
Public Member Functions | |
SolverFactory (std::string solver, const problem_t &problem) | |
Instantiate a factory and load the plug-in. More... | |
~SolverFactory () | |
Unload the plug-in and free the instantiated solver. More... | |
solver_t & | operator() () |
Retrieve a reference on the solver. More... | |
Define a solver factory that instanciate the plug-ins.
The solver factory has to be used to instantiate solvers which are packaged as roboptim-core plug-ins.
This class uses libltdl to handle plug-ins. This lightweight library is provided with GNU Libtool and wraps OS specific behavior into a uniform interface.
S | solver type |
typedef solver_t::problem_t roboptim::SolverFactory< S >::problem_t |
Problem type.
typedef S roboptim::SolverFactory< S >::solver_t |
Solver type.
|
explicit |
Instantiate a factory and load the plug-in.
The constructor search for the plug-in and load it. If the wanted plug-in can not be found, an exception is thrown.
solver | solver name (for instance ``cfsqp'') |
problem | problem that will be solved |
std::runtime_error |
References roboptim::demangle(), getSizeOfProblem(), and getTypeIdOfConstraintsList().
roboptim::SolverFactory< S >::~SolverFactory | ( | ) |
Unload the plug-in and free the instantiated solver.
SolverFactory< S >::solver_t & roboptim::SolverFactory< S >::operator() | ( | ) |
Retrieve a reference on the solver.