All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roboptim::callback::Wrapper< S > Class Template Reference

Raw callback wrapper. More...

#include <roboptim/core/callback/wrapper.hh>

Inheritance diagram for roboptim::callback::Wrapper< S >:
roboptim::SolverCallback< S >

Public Types

typedef SolverCallback< S > parent_t
 Parent type. More...
 
typedef S solver_t
 Type of the solver. More...
 
typedef solver_t::callback_t callback_t
 Callback function type. More...
 
typedef solver_t::problem_t problem_t
 Problem type. More...
 
typedef SolverState< problem_tsolverState_t
 Type of the state of the solver. More...
 
- Public Types inherited from roboptim::SolverCallback< S >
typedef S solver_t
 Solver type. More...
 
typedef solver_t::problem_t problem_t
 Solver problem type. More...
 
typedef solver_t::callback_t callback_t
 Per-iteration callback type. More...
 
typedef solver_t::solverState_t solverState_t
 State of the solver. More...
 

Public Member Functions

 Wrapper (callback_t c, const std::string &name="wrapped callback")
 Default constructor. More...
 
virtual ~Wrapper ()
 Virtual destructor. More...
 
- Public Member Functions inherited from roboptim::SolverCallback< S >
 SolverCallback (const std::string &name="unnamed callback")
 Solver callback constructor. More...
 
virtual ~SolverCallback ()
 Destructor. More...
 
const std::string & name () const
 Return the name of the callback. More...
 
callback_t callback ()
 Callback function. More...
 
void operator() (const problem_t &pb, solverState_t &state)
 Evaluate the callback. More...
 
virtual std::ostream & print (std::ostream &o) const
 Display the callback on the specified output stream. More...
 

Protected Member Functions

virtual void perIterationCallbackUnsafe (const problem_t &pb, solverState_t &state)
 Meta-callback calling multiple callbacks. More...
 
- Protected Member Functions inherited from roboptim::SolverCallback< S >
virtual void perIterationCallback (const problem_t &pb, solverState_t &state)
 Wrapper around the callback function that catch exceptions. More...
 
virtual void perIterationCallbackUnsafe (const problem_t &pb, solverState_t &state)=0
 The actual callback function. More...
 

Detailed Description

template<typename S>
class roboptim::callback::Wrapper< S >

Raw callback wrapper.

Template Parameters
Ssolver type.

Member Typedef Documentation

template<typename S >
typedef solver_t::callback_t roboptim::callback::Wrapper< S >::callback_t

Callback function type.

template<typename S >
typedef SolverCallback<S> roboptim::callback::Wrapper< S >::parent_t

Parent type.

template<typename S >
typedef solver_t::problem_t roboptim::callback::Wrapper< S >::problem_t

Problem type.

template<typename S >
typedef S roboptim::callback::Wrapper< S >::solver_t

Type of the solver.

template<typename S >
typedef SolverState<problem_t> roboptim::callback::Wrapper< S >::solverState_t

Type of the state of the solver.

Constructor & Destructor Documentation

template<typename S >
roboptim::callback::Wrapper< S >::Wrapper ( callback_t  c,
const std::string &  name = "wrapped callback" 
)

Default constructor.

Parameters
craw callback function.
nameoptional name.
template<typename S >
roboptim::callback::Wrapper< S >::~Wrapper ( )
virtual

Virtual destructor.

Member Function Documentation

template<typename S >
void roboptim::callback::Wrapper< S >::perIterationCallbackUnsafe ( const problem_t pb,
solverState_t state 
)
protectedvirtual

Meta-callback calling multiple callbacks.

Unsafe version that can throw exceptions.

Parameters
pbproblem.
statesolver state.