file REDIChunkInterpreter.h

Header of the RED::IChunkInterpreter interface. This is the interface needed to interpret the content of a chunk read from a RED::IStream instance.

Go to the source code of this file.





Defines documentation

This macro declares the Interpret method on a class. This method is called after a chunk of data has been read from a file stream. It converts the raw chunk of bytes into a resulting object. Macro parameters are listed below:

  • iReferenceManager: The object instance used to solve all links between chunk parameters (crossed references, shared resources, etc...)
  • iStream: The source stream.
  • iChunkSignature: Chunk number.
  • iChunkSize: Byte size of the chunk.
  • oResult: Created object.
  • iState: Current transaction.
  • Returns values: RED_OK in case of success,
    RED_BAD_PARAM for all invalid inputs,
    RED_ALLOC_FAILURE upon a memory allocation failure,
    RED_FAIL otherwise.


  static RED_RC Interpret( RED::IReferenceManager*      iReferenceManager,\
                           RED::IStream*                iStream,\
                           const RED::StreamingPolicy&  iPolicy,\
                           unsigned int                 iChunkSignature,\
                           RED::uint64			            iChunkSize,\
                           RED::Object**                oResult,\
                           const RED::State&            iState );