dune-functions
2.5.0
|
The internal wrapper interface for type erasure. More...
#include <dune/functions/common/typeerasure.hh>
Public Member Functions | |
virtual const std::type_info & | target_type () const =0 |
virtual TypeErasureWrapperInterface< Interface > * | clone () const=0 |
Clones the object. More... | |
virtual TypeErasureWrapperInterface< Interface > * | clone (void *buffer) const=0 |
Clones the object into buffer. More... | |
virtual TypeErasureWrapperInterface< Interface > * | move (void *buffer)=0 |
Move object into buffer. More... | |
The internal wrapper interface for type erasure.
This class adds some foundation interfaces needed for proper dynamic polymorphism and type erasure.
The actual application interface has to be provided by the user.
Interface | Class defininig the internal abstract virtual interface |
|
pure virtualinherited |
Clones the object.
clone() needs to be redefined by an implementation class, with the return type covariantly adapted. This will return a new copy of *this via a pointer to newly allocated memory. Remember to delete the resulting pointer.
|
pure virtualinherited |
Clones the object into buffer.
clone(buffer) needs to be redefined by an implementation class, with the return type covariantly adapted. This will return a copy of this created in the given buffer using placement-new with copy construction. You must not delete the returned pointer since it points to the given buffer (however with the proper type instead of void).
|
pure virtualinherited |
Move object into buffer.
move(buffer) needs to be redefined by an implementation class, with the return type covariantly adapted. This will return a copy of this created in the given buffer using placement-new with move construction. You must not delete the returned pointer since it points to the given buffer (however with the proper type instead of void).
|
pure virtual |