21 #ifndef __SBG_STREAM_BUFFER_COMMON_H__ 22 #define __SBG_STREAM_BUFFER_COMMON_H__ 33 #if SBG_CONFIG_BIG_ENDIAN == 1 37 #define sbgStreamBufferReadUint16 sbgStreamBufferReadUint16BE 38 #define sbgStreamBufferReadInt16 sbgStreamBufferReadInt16BE 39 #define sbgStreamBufferReadUint24 sbgStreamBufferReadUint24BE 40 #define sbgStreamBufferReadInt24 sbgStreamBufferReadInt24BE 41 #define sbgStreamBufferReadUint32 sbgStreamBufferReadUint32BE 42 #define sbgStreamBufferReadInt32 sbgStreamBufferReadInt32BE 43 #define sbgStreamBufferReadUint64 sbgStreamBufferReadUint64BE 44 #define sbgStreamBufferReadInt64 sbgStreamBufferReadInt64BE 45 #define sbgStreamBufferReadSizeT32 sbgStreamBufferReadSizeT32BE 46 #define sbgStreamBufferReadSizeT64 sbgStreamBufferReadSizeT64BE 47 #define sbgStreamBufferReadFloat sbgStreamBufferReadFloatBE 48 #define sbgStreamBufferReadDouble sbgStreamBufferReadDoubleBE 50 #define sbgStreamBufferWriteUint16 sbgStreamBufferWriteUint16BE 51 #define sbgStreamBufferWriteInt16 sbgStreamBufferWriteInt16BE 52 #define sbgStreamBufferWriteUint24 sbgStreamBufferWriteUint24BE 53 #define sbgStreamBufferWriteInt24 sbgStreamBufferWriteInt24BE 54 #define sbgStreamBufferWriteUint32 sbgStreamBufferWriteUint32BE 55 #define sbgStreamBufferWriteInt32 sbgStreamBufferWriteInt32BE 56 #define sbgStreamBufferWriteUint64 sbgStreamBufferWriteUint64BE 57 #define sbgStreamBufferWriteInt64 sbgStreamBufferWriteInt64BE 58 #define sbgStreamBufferWriteSizeT32 sbgStreamBufferWriteSizeT32BE 59 #define sbgStreamBufferWriteSizeT64 sbgStreamBufferWriteSizeT64BE 60 #define sbgStreamBufferWriteFloat sbgStreamBufferWriteFloatBE 61 #define sbgStreamBufferWriteDouble sbgStreamBufferWriteDoubleBE 66 #define sbgStreamBufferReadUint16 sbgStreamBufferReadUint16LE 67 #define sbgStreamBufferReadInt16 sbgStreamBufferReadInt16LE 68 #define sbgStreamBufferReadUint24 sbgStreamBufferReadUint24LE 69 #define sbgStreamBufferReadInt24 sbgStreamBufferReadInt24LE 70 #define sbgStreamBufferReadUint32 sbgStreamBufferReadUint32LE 71 #define sbgStreamBufferReadInt32 sbgStreamBufferReadInt32LE 72 #define sbgStreamBufferReadUint64 sbgStreamBufferReadUint64LE 73 #define sbgStreamBufferReadInt64 sbgStreamBufferReadInt64LE 74 #define sbgStreamBufferReadSizeT32 sbgStreamBufferReadSizeT32LE 75 #define sbgStreamBufferReadSizeT64 sbgStreamBufferReadSizeT64LE 76 #define sbgStreamBufferReadFloat sbgStreamBufferReadFloatLE 77 #define sbgStreamBufferReadDouble sbgStreamBufferReadDoubleLE 79 #define sbgStreamBufferWriteUint16 sbgStreamBufferWriteUint16LE 80 #define sbgStreamBufferWriteInt16 sbgStreamBufferWriteInt16LE 81 #define sbgStreamBufferWriteUint24 sbgStreamBufferWriteUint24LE 82 #define sbgStreamBufferWriteInt24 sbgStreamBufferWriteInt24LE 83 #define sbgStreamBufferWriteUint32 sbgStreamBufferWriteUint32LE 84 #define sbgStreamBufferWriteInt32 sbgStreamBufferWriteInt32LE 85 #define sbgStreamBufferWriteUint64 sbgStreamBufferWriteUint64LE 86 #define sbgStreamBufferWriteInt64 sbgStreamBufferWriteInt64LE 87 #define sbgStreamBufferWriteSizeT32 sbgStreamBufferWriteSizeT32LE 88 #define sbgStreamBufferWriteSizeT64 sbgStreamBufferWriteSizeT64LE 89 #define sbgStreamBufferWriteFloat sbgStreamBufferWriteFloatLE 90 #define sbgStreamBufferWriteDouble sbgStreamBufferWriteDoubleLE 97 #define sbgStreamBufferReadUint8LE sbgStreamBufferReadUint8 98 #define sbgStreamBufferReadInt8LE sbgStreamBufferReadInt8 99 #define sbgStreamBufferReadBufferLE sbgStreamBufferReadBuffer 101 #define sbgStreamBufferWriteUint8LE sbgStreamBufferWriteUint8 102 #define sbgStreamBufferWriteInt8LE sbgStreamBufferWriteInt8 103 #define sbgStreamBufferWriteBufferLE sbgStreamBufferWriteBuffer 105 #define sbgStreamBufferReadUint8BE sbgStreamBufferReadUint8 106 #define sbgStreamBufferReadInt8BE sbgStreamBufferReadInt8 107 #define sbgStreamBufferReadBufferBE sbgStreamBufferReadBuffer 109 #define sbgStreamBufferWriteUint8BE sbgStreamBufferWriteUint8 110 #define sbgStreamBufferWriteInt8BE sbgStreamBufferWriteInt8 111 #define sbgStreamBufferWriteBufferBE sbgStreamBufferWriteBuffer 547 SBG_ASSERT((pBuffer) || (numBytesToRead == 0));
562 memcpy(pBuffer, pHandle->
pCurrentPtr, numBytesToRead);
678 SBG_ASSERT((pBuffer) || (numBytesToWrite == 0));
693 memcpy(pHandle->
pCurrentPtr, pBuffer, numBytesToWrite);
SBG_INLINE SbgErrorCode sbgStreamBufferInitForRead(SbgStreamBuffer *pHandle, const void *pLinkedBuffer, size_t bufferSize)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint8(SbgStreamBuffer *pHandle, uint8 value)
SBG_INLINE SbgErrorCode sbgStreamBufferSeek(SbgStreamBuffer *pHandle, size_t offset, SbgSBSeekOrigin origin)
struct _SbgStreamBuffer SbgStreamBuffer
enum _SbgSBMode SbgSBMode
SBG_INLINE size_t sbgStreamBufferGetSize(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferInitForWrite(SbgStreamBuffer *pHandle, void *pLinkedBuffer, size_t bufferSize)
SBG_INLINE SbgErrorCode sbgStreamBufferReadBuffer(SbgStreamBuffer *pHandle, void *pBuffer, size_t numBytesToRead)
enum _SbgSBSeekOrigin SbgSBSeekOrigin
SBG_INLINE size_t sbgStreamBufferGetSpace(SbgStreamBuffer *pHandle)
SBG_INLINE void * sbgStreamBufferGetLinkedBuffer(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteBuffer(SbgStreamBuffer *pHandle, const void *pBuffer, size_t numBytesToWrite)
SBG_INLINE size_t sbgStreamBufferTell(SbgStreamBuffer *pHandle)
Main header file for SBG Systems common C library.
SBG_INLINE SbgErrorCode sbgStreamBufferWriteInt8(SbgStreamBuffer *pHandle, int8 value)
SBG_INLINE int8 sbgStreamBufferReadInt8(SbgStreamBuffer *pHandle)
#define SBG_ASSERT(expression)
SBG_INLINE size_t sbgStreamBufferGetLength(SbgStreamBuffer *pHandle)
SBG_INLINE uint8 sbgStreamBufferReadUint8(SbgStreamBuffer *pHandle)
SBG_INLINE void sbgStreamBufferClearLastError(SbgStreamBuffer *pHandle)
#define SBG_LOG_ERROR(errorCode, format,...)
SBG_INLINE void * sbgStreamBufferGetCursor(SbgStreamBuffer *pHandle)
enum _SbgErrorCode SbgErrorCode
SBG_INLINE SbgErrorCode sbgStreamBufferGetLastError(SbgStreamBuffer *pHandle)