gstlearn
1.0.0
CCC
Classes
|
Macros
ICloneable.hpp File Reference
#include "gstlearn_export.hpp"
#include <typeinfo>
#include <assert.h>
Classes
class
ICloneable
Macros
#define
IMPLEMENT_CLONING
(Class)
Macro Definition Documentation
◆
IMPLEMENT_CLONING
#define IMPLEMENT_CLONING
(
Class
)
Value:
public
: \
inline
virtual
Class* clone() const override \
{ \
static_assert( \
! std::is_abstract<Class>::value, \
"Class cannot be cloned as it is abstract"
\
); \
assert(
typeid
(*
this
) ==
typeid
(Class)); \
return (
new
Class(*
this
)); \
}
include
Basic
ICloneable.hpp
Generated on Thu Nov 9 2023 12:55:52 for gstlearn by
1.9.1