kblib 0.2.3
General utilities library for modern C++
kblib::clone_copy< Obj > Struct Template Reference

Implements copy construction using a virtual clone method. This type is provided mostly as an example. More...

#include <kblib/poly_obj.h>

Public Member Functions

 clone_copy ()=default
 Does nothing. More...
 
template<typename T >
 clone_copy (T *)
 Does nothing. More...
 
auto copy (void *dest, const Obj *from) -> Obj *
 Invokes the clone method to copy the object. More...
 

Detailed Description

template<typename Obj>
struct kblib::clone_copy< Obj >

Implements copy construction using a virtual clone method. This type is provided mostly as an example.

Definition at line 291 of file poly_obj.h.

Constructor & Destructor Documentation

◆ clone_copy() [1/2]

template<typename Obj >
kblib::clone_copy< Obj >::clone_copy ( )
default

Does nothing.

◆ clone_copy() [2/2]

template<typename Obj >
template<typename T >
kblib::clone_copy< Obj >::clone_copy ( T *  )
inline

Does nothing.

Definition at line 296 of file poly_obj.h.

Member Function Documentation

◆ copy()

template<typename Obj >
auto kblib::clone_copy< Obj >::copy ( void *  dest,
const Obj *  from 
) -> Obj*
inline

Invokes the clone method to copy the object.

Definition at line 299 of file poly_obj.h.


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