class RED::IChunkSaver

Interface that exposes chunk saving method. More...

#include <REDIChunkSaver.h>

Inherits: IREDObject.

Inherited by: LayerSet, RenderCode, RenderShaderParameter, Shader, UserDataRaw and VolumetricEffect.

Public functions:

virtual RED_RCSave ( RED::IStream * iStream, RED::StreamingPolicy & iPolicy, int iState = -1 ) const = 0

Public static functions:

static RED::CIDGetClassID ( )

Detailed description:

Interface that exposes chunk saving method.

When saving a file, objects implementing this interface will automatically be called by the RED::IStream::SaveChunk method to save ourselves to the stream. A corresponding RED::IChunkInterpreterProto implementation should exist in order to reload data saved using this interface.

Functions documentation

public virtual RED_RC RED::IChunkSaver::Save(RED::IStream *iStream,
RED::StreamingPolicy &iPolicy,
intiState = -1
)const = 0

Saves the object content as one or more chunks in the given stream.


iStream:Pointer to the stream where the data must be saved.
iPolicy:Reference to the streaming policy to be used.
iState:Optional state number parameter at which the data to be saved must be retrieved. Default is set to 0 (for current state).


RED_OK on success,
RED_FILE_WRITE_ERROR on a file write error (if iStream is a file stream),
RED_ALLOC_FAILURE on a memory allocation error,
RED_FAIL otherwise.

Implemented by: RED::LayerSet::Save, RED::RenderCode::Save, RED::RenderShader::Save, RED::RenderShaderParameter::Save, RED::StateShader::Save, RED::UserDataRaw::Save, RED::VolumetricEffectBoxVolume::Save, RED::VolumetricEffectClouds::Save and RED::VolumetricEffectLightVolume::Save.