Clonable component. More...

#include <component.h>

Inheritance diagram for Clonable:
Component SIMDAlignedType Asset Film GeneralizedBSDF Texture TriangleMesh Film_HDR BSDF Emitter Texture_Bitmap TriangleMesh_Obj TriangleMesh_Raw BSDF_CookTorrance BSDF_Diffuse BSDF_Flesnel BSDF_Null BSDF_ReflectAll BSDF_RefractAll Light Sensor

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 ( ,
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
oThe target instance for cloning the asset.