Go to the SVN repository for this file.
1 #ifndef CORELIB___NCBI_BSWAP__HPP 2 #define CORELIB___NCBI_BSWAP__HPP 76 static float GetFloat(
const unsigned char* ptr);
78 static double GetDouble(
const unsigned char* ptr);
98 #ifdef WORDS_BIGENDIAN 110 #ifdef WORDS_BIGENDIAN 111ptr[1] = (
unsignedchar)(
value>> 8);
112ptr[0] = (
unsignedchar)(
value);
114ptr[0] = (
unsignedchar)(
value>> 8);
115ptr[1] = (
unsignedchar)(
value);
123 #ifdef WORDS_BIGENDIAN 125(
Int4(ptr[2]) << 16) |
126(
Int4(ptr[1]) << 8) |
130(
Int4(ptr[1]) << 16) |
131(
Int4(ptr[2]) << 8) |
140 #ifdef WORDS_BIGENDIAN 141ptr[3] = (
unsignedchar)(
value>> 24);
142ptr[2] = (
unsignedchar)(
value>> 16);
143ptr[1] = (
unsignedchar)(
value>> 8);
144ptr[0] = (
unsignedchar)(
value);
146ptr[0] = (
unsignedchar)(
value>> 24);
147ptr[1] = (
unsignedchar)(
value>> 16);
148ptr[2] = (
unsignedchar)(
value>> 8);
149ptr[3] = (
unsignedchar)(
value);
156 #ifdef WORDS_BIGENDIAN 158(
Int8(ptr[6]) << 48) |
159(
Int8(ptr[5]) << 40) |
160(
Int8(ptr[4]) << 32) |
161(
Int8(ptr[3]) << 24) |
162(
Int8(ptr[2]) << 16) |
163(
Int8(ptr[1]) << 8) |
167(
Int8(ptr[1]) << 48) |
168(
Int8(ptr[2]) << 40) |
169(
Int8(ptr[3]) << 32) |
170(
Int8(ptr[4]) << 24) |
171(
Int8(ptr[5]) << 16) |
172(
Int8(ptr[6]) << 8) |
182 #ifdef WORDS_BIGENDIAN 183ptr[7] = (
unsignedchar)(
value>> 56);
184ptr[6] = (
unsignedchar)(
value>> 48);
185ptr[5] = (
unsignedchar)(
value>> 40);
186ptr[4] = (
unsignedchar)(
value>> 32);
187ptr[3] = (
unsignedchar)(
value>> 24);
188ptr[2] = (
unsignedchar)(
value>> 16);
189ptr[1] = (
unsignedchar)(
value>> 8);
190ptr[0] = (
unsignedchar)(
value);
192ptr[0] = (
unsignedchar)(
value>> 56);
193ptr[1] = (
unsignedchar)(
value>> 48);
194ptr[2] = (
unsignedchar)(
value>> 40);
195ptr[3] = (
unsignedchar)(
value>> 32);
196ptr[4] = (
unsignedchar)(
value>> 24);
197ptr[5] = (
unsignedchar)(
value>> 16);
198ptr[6] = (
unsignedchar)(
value>> 8);
199ptr[7] = (
unsignedchar)(
value);
static Int8 GetInt8(const unsigned char *ptr)
static void PutFloat(unsigned char *ptr, float value)
static void PutInt2(unsigned char *ptr, Int2 value)
static double GetDouble(const unsigned char *ptr)
static Int2 GetInt2(const unsigned char *ptr)
static void PutDouble(unsigned char *ptr, double value)
static void PutInt8(unsigned char *ptr, Int8 value)
static Int4 GetInt4(const unsigned char *ptr)
static float GetFloat(const unsigned char *ptr)
static void PutInt4(unsigned char *ptr, Int4 value)
int16_t Int2
2-byte (16-bit) signed integer
int32_t Int4
4-byte (32-bit) signed integer
int64_t Int8
8-byte (64-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const GenericPointer< typename T::ValueType > T2 value
The NCBI C++/STL use hints.
Defines Limits for the types used in NCBI C/C++ toolkit.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4