Clonable Class Reference
#include <component.h>
Inheritance diagram for Clonable:
Public Member Functions | |
LM_INTERFACE_CLASS (Clonable, Component, 1) | |
LM_DISABLE_COPY_AND_MOVE (Clonable) | |
LM_INTERFACE_F (0, Clone, void(Clonable *o)) | |
Clone the instalce. More... | |
Public Member Functions inherited from SIMDAlignedType | |
void * | operator new (std::size_t size) throw (std::bad_alloc) |
void | operator delete (void *p) |
Detailed Description
Clonable component.
In some case, a component instance needs to be copied to another component instances. From the point of the implementation, we prohibit to use copy constructors so all interface possible to be copied must implement this interface.
Member Function Documentation
Clonable::LM_INTERFACE_F | ( | 0 | , |
Clone | , | ||
void(Clonable *o) | |||
) |
Clone the instalce.
Clones the content of the instance to the given argument. This function is called from Component::Clone
function. The implementation of the interface must copy its data to the instance o
.
- Parameters
-
o The target instance for cloning the asset.