aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator::Cloneable< T > Struct Template Referenceabstract

Mixin which makes a class/class hierarchy cloneable. More...

#include <aligator/core/clone.hpp>

Inheritance diagram for aligator::Cloneable< T >:
[legend]

Public Member Functions

shared_ptr< T > clone () const
 

Protected Member Functions

virtual Cloneableclone_impl () const =0
 

Detailed Description

template<typename T>
struct aligator::Cloneable< T >

Mixin which makes a class/class hierarchy cloneable.

Inheriting from Cloneable<T> creates a function clone() returning shared_ptr<T>. Child classes of T only need to implement the virtual member function clone_impl() which returns the covariant pointer type T*.

Template Parameters
Theclass (or base class in a hierarchy) we want to make cloneable.

Definition at line 12 of file clone.hpp.

Member Function Documentation

◆ clone()

template<typename T >
shared_ptr< T > aligator::Cloneable< T >::clone ( ) const
inline

Definition at line 14 of file clone.hpp.

◆ clone_impl()


The documentation for this struct was generated from the following file: