Loading...
Searching...
No Matches
clonable.hpp
Go to the documentation of this file.
1
2
#pragma once
3
4
#include "
memlite/common.hpp
"
5
6
namespace
by {
7
13
class
_nout
clonable
{
14
BY_ME
(
clonable
)
15
BY_INIT_META(
me
)
16
17
public
:
18
virtual
~clonable
() {}
19
20
virtual
me
* clone()
const
= 0;
21
22
virtual
me
* cloneDeep()
const
{
23
me
* ret = clone();
24
ret->onCloneDeep(*
this
);
25
return
ret;
26
}
27
28
virtual
void
onCloneDeep(
const
me
&
from
) {}
29
};
30
}
by::clonable
Interface for objects that can be cloned.
Definition
clonable.hpp:13
common.hpp
by::noWrap
Rich logging support with polymorphic type conversion.
Definition
richLog.hpp:34