IChunkSaver
Functions
Detailed Description
-
class IChunkSaver : public RED::IREDObject
Interface that exposes chunk saving method.
@related class RED::ChunkInterpretersDictionary, class RED::IREDFile, class RED::IStream
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.
Subclassed by RED::LayerSet, RED::RenderCode, RED::RenderShaderParameter, RED::Shader, RED::UserDataRaw, RED::VolumetricEffect
Public Functions
-
SET_CID(CID_class_REDIChunkSaver)
-
virtual RED_RC Save(RED::IStream *iStream, RED::StreamingPolicy &iPolicy, int iState = -1) const = 0
Saves the object content as one or more chunks in the given stream.
- Parameters
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).
- Returns
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.
-
SET_CID(CID_class_REDIChunkSaver)