Define a solver factory that instanciate the plug-ins. More...
#include <roboptim/core/solver-factory.hh>
Public Types | |
typedef T | solver_t |
Solver type. | |
typedef T::problem_t | problem_t |
Problem type. | |
Public Member Functions | |
SolverFactory (std::string solver, const problem_t &problem) throw (std::runtime_error) | |
Instantiate a factory and load the plug-in. | |
~SolverFactory () throw () | |
Unload the plug-in and free the instantiated solver. | |
solver_t & | operator() () throw () |
Retrieve a reference on the solver. |
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.
T | solver type |
typedef T::problem_t roboptim::SolverFactory< T >::problem_t |
Problem type.
typedef T roboptim::SolverFactory< T >::solver_t |
Solver type.
roboptim::SolverFactory< T >::SolverFactory | ( | std::string | solver, |
const problem_t & | problem | ||
) | throw (std::runtime_error) [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 |
References getSizeOfProblem().
roboptim::SolverFactory< T >::~SolverFactory | ( | ) | throw () |
Unload the plug-in and free the instantiated solver.
SolverFactory< T >::solver_t & roboptim::SolverFactory< T >::operator() | ( | ) | throw () |
Retrieve a reference on the solver.