21 #ifndef __SBG_STREAM_BUFFER_BE_H__ 22 #define __SBG_STREAM_BUFFER_BE_H__ 57 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 68 return bytesValues[0];
79 #if (SBG_CONFIG_BIG_ENDIAN == 1) 80 return bytesValues[1] | (bytesValues[0] << 8);
82 return bytesValues[0] | (bytesValues[1] << 8);
128 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 139 return bytesValues[0];
150 #if (SBG_CONFIG_BIG_ENDIAN == 1) 151 return bytesValues[1] | (bytesValues[0] << 8);
153 return bytesValues[0] | (bytesValues[1] << 8);
179 int32 bytesValues[3];
206 #if (SBG_CONFIG_BIG_ENDIAN == 1) 207 return bytesValues[2] | (bytesValues[1] << 8) | (bytesValues[0] << 16);
209 return bytesValues[0] | (bytesValues[1] << 8) | (bytesValues[2] << 16);
261 #if (SBG_CONFIG_BIG_ENDIAN == 1) 262 return bytesValues[2] | (bytesValues[1] << 8) | (bytesValues[0] << 16);
264 return bytesValues[0] | (bytesValues[1] << 8) | (bytesValues[2] << 16);
289 int32 bytesValues[4];
309 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 320 return bytesValues[0];
333 #if (SBG_CONFIG_BIG_ENDIAN == 1) 334 return bytesValues[3] | (bytesValues[2] << 8) | (bytesValues[1] << 16) | (bytesValues[0] << 24);
336 return bytesValues[0] | (bytesValues[1] << 8) | (bytesValues[2] << 16) | (bytesValues[3] << 24);
382 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 393 return bytesValues[0];
406 #if (SBG_CONFIG_BIG_ENDIAN == 1) 407 return bytesValues[3] | (bytesValues[2] << 8) | (bytesValues[1] << 16) | (bytesValues[0] << 24);
409 return bytesValues[0] | (bytesValues[1] << 8) | (bytesValues[2] << 16) | (bytesValues[3] << 24);
456 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 478 #if (SBG_CONFIG_BIG_ENDIAN == 1) 479 return (lowPart << 32) | highPart;
481 return lowPart | (highPart << 32);
528 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 550 #if (SBG_CONFIG_BIG_ENDIAN == 1) 551 return (lowPart << 32) | highPart;
553 return lowPart | (highPart << 32);
643 return floatInt.
valF;
692 return doubleInt.
valF;
739 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 753 #if (SBG_CONFIG_BIG_ENDIAN == 1) 800 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 814 #if (SBG_CONFIG_BIG_ENDIAN == 1) 866 #if (SBG_CONFIG_BIG_ENDIAN == 1) 927 #if (SBG_CONFIG_BIG_ENDIAN == 1) 983 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 997 #if (SBG_CONFIG_BIG_ENDIAN == 1) 1048 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 1062 #if (SBG_CONFIG_BIG_ENDIAN == 1) 1113 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 1127 #if (SBG_CONFIG_BIG_ENDIAN == 1) 1186 #if (SBG_CONFIG_UNALIGNED_ACCESS_AUTH == 1) && (SBG_CONFIG_BIG_ENDIAN == 1) 1200 #if (SBG_CONFIG_BIG_ENDIAN == 1) 1299 floatInt.
valF = value;
1333 doubleInt.
valF = value;
SBG_INLINE SbgErrorCode sbgStreamBufferWriteFloatBE(SbgStreamBuffer *pHandle, float value)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteInt16BE(SbgStreamBuffer *pHandle, int16 value)
SBG_INLINE float sbgStreamBufferReadFloatBE(SbgStreamBuffer *pHandle)
SBG_INLINE uint32 sbgStreamBufferReadUint24BE(SbgStreamBuffer *pHandle)
SBG_INLINE int16 sbgStreamBufferReadInt16BE(SbgStreamBuffer *pHandle)
Used to read/write data from/to a memory buffer stream.
SBG_INLINE SbgErrorCode sbgStreamBufferWriteSizeT64BE(SbgStreamBuffer *pHandle, size_t value)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint64BE(SbgStreamBuffer *pHandle, uint64 value)
SBG_INLINE uint16 sbgStreamBufferReadUint16BE(SbgStreamBuffer *pHandle)
SBG_INLINE size_t sbgStreamBufferReadSizeT32BE(SbgStreamBuffer *pHandle)
unsigned long long int uint64
SBG_INLINE double sbgStreamBufferReadDoubleBE(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteDoubleBE(SbgStreamBuffer *pHandle, double value)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteSizeT32BE(SbgStreamBuffer *pHandle, size_t value)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteInt24BE(SbgStreamBuffer *pHandle, int32 value)
signed long long int int64
SBG_INLINE int32 sbgStreamBufferReadInt24BE(SbgStreamBuffer *pHandle)
SBG_INLINE size_t sbgStreamBufferGetSpace(SbgStreamBuffer *pHandle)
SBG_INLINE uint32 sbgStreamBufferReadUint32BE(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint24BE(SbgStreamBuffer *pHandle, uint32 value)
SBG_INLINE int64 sbgStreamBufferReadInt64BE(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint16BE(SbgStreamBuffer *pHandle, uint16 value)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint32BE(SbgStreamBuffer *pHandle, uint32 value)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteInt64BE(SbgStreamBuffer *pHandle, int64 value)
SBG_INLINE int32 sbgStreamBufferReadInt32BE(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteInt32BE(SbgStreamBuffer *pHandle, int32 value)
#define SBG_ASSERT(expression)
SBG_INLINE uint64 sbgStreamBufferReadUint64BE(SbgStreamBuffer *pHandle)
SBG_INLINE size_t sbgStreamBufferReadSizeT64BE(SbgStreamBuffer *pHandle)
enum _SbgErrorCode SbgErrorCode