SophiaFramework UNIVERSE 5.3 |
The SFXEndian class provides the static functions for converting the endian.
Note | |
---|---|
Regarding the following function names, the B, L, and P letters represent big endian, little endian, and paltform endian respectively. |
Example 814. How to use the endian conversion class.
UInt08 n1 = 0xAB; // swap upper 4 bits with lower 4 bits n1 = SFXEndian::NibbleSwapU08(n1); // n1 = 0xBA UInt32 n2 = 0x12345678; // convert endian n2 = SFXEndian::EndianSwapU32(n2); // n2 = 0x78563412 Byte table[4]; // write value of UInt32 type to the memory as big endian SFXEndian::SetPToBU32(table, n2); // table = {0x78, 0x56, 0x34, 0x12} table[0] = 0x12; table[1] = 0x34; table[2] = 0x56; table[3] = 0x78; // read value of UInt32 type from the memory as big endian UInt32 n3 = SFXEndian::GetBToPU32(table); // n3 = 0x12345678 // read value of UInt32 type from the memory as little endian UInt32 n4 = SFXEndian::GetLToPU32(table); // n4 = 0x78563412
Public Functions | |
---|---|
static Float32 |
EndianBToPF32(
Float32 value
) Convert a value of Float32 type from big endian into platform endian.
|
static Float64 |
EndianBToPF64(
Float64 value
) Convert a value of Float64 type from big endian into platform endian.
|
static SInt08 |
EndianBToPS08(
SInt08 value
) Convert a value of SInt08 type from big endian into platform endian.
|
static SInt16 |
EndianBToPS16(
SInt16 value
) Convert a value of SInt16 type from big endian into platform endian.
|
static SInt32 |
EndianBToPS32(
SInt32 value
) Convert a value of SInt32 type from big endian into platform endian.
|
static SInt64 |
EndianBToPS64(
SInt64 value
) Convert a value of SInt64 type from big endian into platform endian.
|
static UInt08 |
EndianBToPU08(
UInt08 value
) Convert a value of UInt08 type from big endian into platform endian.
|
static UInt16 |
EndianBToPU16(
UInt16 value
) Convert a value of UInt16 type from big endian into platform endian.
|
static UInt32 |
EndianBToPU32(
UInt32 value
) Convert a value of UInt32 type from big endian into platform endian.
|
static UInt64 |
EndianBToPU64(
UInt64 value
) Convert a value of UInt64 type from big endian into platform endian.
|
static Float32 |
EndianLToPF32(
Float32 value
) Convert a value of Float32 type from little endian into platform endian.
|
static Float64 |
EndianLToPF64(
Float64 value
) Convert a value of Float64 type from little endian into platform endian.
|
static SInt08 |
EndianLToPS08(
SInt08 value
) Convert a value of SInt08 type from little endian into platform endian.
|
static SInt16 |
EndianLToPS16(
SInt16 value
) Convert a value of SInt16 type from little endian into platform endian.
|
static SInt32 |
EndianLToPS32(
SInt32 value
) Convert a value of SInt32 type from little endian into platform endian.
|
static SInt64 |
EndianLToPS64(
SInt64 value
) Convert a value of SInt64 type from little endian into platform endian.
|
static UInt08 |
EndianLToPU08(
UInt08 value
) Convert a value of UInt08 type from little endian into platform endian.
|
static UInt16 |
EndianLToPU16(
UInt16 value
) Convert a value of UInt16 type from little endian into platform endian.
|
static UInt32 |
EndianLToPU32(
UInt32 value
) Convert a value of UInt32 type from little endian into platform endian.
|
static UInt64 |
EndianLToPU64(
UInt64 value
) Convert a value of UInt64 type from little endian into platform endian.
|
static Float32 |
EndianPToBF32(
Float32 value
) Convert a value of Float32 type from platform endian into big endian.
|
static Float64 |
EndianPToBF64(
Float64 value
) Convert a value of Float64 type from platform endian into big endian.
|
static SInt08 |
EndianPToBS08(
SInt08 value
) Convert a value of SInt08 type from platform endian into big endian.
|
static SInt16 |
EndianPToBS16(
SInt16 value
) Convert a value of SInt16 type from platform endian into big endian.
|
static SInt32 |
EndianPToBS32(
SInt32 value
) Convert a value of SInt32 type from platform endian into big endian.
|
static SInt64 |
EndianPToBS64(
SInt64 value
) Convert a value of SInt64 type from platform endian into big endian.
|
static UInt08 |
EndianPToBU08(
UInt08 value
) Convert a value of UInt08 type from platform endian into big endian.
|
static UInt16 |
EndianPToBU16(
UInt16 value
) Convert a value of UInt16 type from platform endian into big endian.
|
static UInt32 |
EndianPToBU32(
UInt32 value
) Convert a value of UInt32 type from platform endian into big endian.
|
static UInt64 |
EndianPToBU64(
UInt64 value
) Convert a value of UInt64 type from platform endian into big endian.
|
static Float32 |
EndianPToLF32(
Float32 value
) Convert a value of Float32 type from platform endian into little endian.
|
static Float64 |
EndianPToLF64(
Float64 value
) Convert a value of Float64 type from platform endian into little endian.
|
static SInt08 |
EndianPToLS08(
SInt08 value
) Convert a value of SInt08 type from platform endian into little endian.
|
static SInt16 |
EndianPToLS16(
SInt16 value
) Convert a value of SInt16 type from platform endian into little endian.
|
static SInt32 |
EndianPToLS32(
SInt32 value
) Convert a value of SInt32 type from platform endian into little endian.
|
static SInt64 |
EndianPToLS64(
SInt64 value
) Convert a value of SInt64 type from platform endian into little endian.
|
static UInt08 |
EndianPToLU08(
UInt08 value
) Convert a value of UInt08 type from platform endian into little endian.
|
static UInt16 |
EndianPToLU16(
UInt16 value
) Convert a value of UInt16 type from platform endian into little endian.
|
static UInt32 |
EndianPToLU32(
UInt32 value
) Convert a value of UInt32 type from platform endian into little endian.
|
static UInt64 |
EndianPToLU64(
UInt64 value
) Convert a value of UInt64 type from platform endian into little endian.
|
static Float32 |
EndianSwapF32(
Float32 value
) Change the endian of a value of Float32 type.
|
static Float64 |
EndianSwapF64(
Float64 value
) Change the endian of a value of Float64 type.
|
static SInt08 |
EndianSwapS08(
SInt08 value
) Change the endian of a value of SInt08 type.
|
static SInt16 |
EndianSwapS16(
SInt16 value
) Change the endian of a value of SInt16 type.
|
static SInt32 |
EndianSwapS32(
SInt32 value
) Change the endian of a value of SInt32 type.
|
static SInt64 |
EndianSwapS64(
SInt64 value
) Change the endian of a value of SInt64 type.
|
static UInt08 |
EndianSwapU08(
UInt08 value
) Change the endian of a value of UInt08 type.
|
static UInt16 |
EndianSwapU16(
UInt16 value
) Change the endian of a value of UInt16 type.
|
static UInt32 |
EndianSwapU32(
UInt32 value
) Change the endian of a value of UInt32 type.
|
static UInt64 |
EndianSwapU64(
UInt64 value
) Change the endian of a value of UInt64 type.
|
static Float32 |
GetBToPF32(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static Float64 |
GetBToPF64(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static SInt08 |
GetBToPS08(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static SInt16 |
GetBToPS16(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static SInt32 |
GetBToPS32(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static SInt64 |
GetBToPS64(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static UInt08 |
GetBToPU08(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static UInt16 |
GetBToPU16(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static UInt32 |
GetBToPU32(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static UInt64 |
GetBToPU64(
VoidConstPtr address
) Convert the value pointed by the specified pointer from big endian into platform endian.
|
static Float32 |
GetLToPF32(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static Float64 |
GetLToPF64(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static SInt08 |
GetLToPS08(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static SInt16 |
GetLToPS16(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static SInt32 |
GetLToPS32(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static SInt64 |
GetLToPS64(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static UInt08 |
GetLToPU08(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static UInt16 |
GetLToPU16(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static UInt32 |
GetLToPU32(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static UInt64 |
GetLToPU64(
VoidConstPtr address
) Convert the value pointed by the specified pointer from little endian into platform endian .
|
static SInt08 |
NibbleSwapS08(
SInt08 value
) Swap the nibble of a value of SInt08 type.
|
static UInt08 |
NibbleSwapU08(
UInt08 value
) Swap the nibble of a value of UInt08 type.
|
static Void |
SetPToBF32(
VoidPtr address
, Float32 value
) Set a value of Float32 type converting platform endian into big endian.
|
static Void |
SetPToBF64(
VoidPtr address
, Float64 value
) Set a value of Float64 type converting platform endian into big endian.
|
static Void |
SetPToBS08(
VoidPtr address
, SInt08 value
) Set a value of SInt08 type converting platform endian into big endian.
|
static Void |
SetPToBS16(
VoidPtr address
, SInt16 value
) Set a value of SInt16 type converting platform endian into big endian.
|
static Void |
SetPToBS32(
VoidPtr address
, SInt32 value
) Set a value of SInt32 type converting platform endian into big endian.
|
static Void |
SetPToBS64(
VoidPtr address
, SInt64 value
) Set a value of SInt64 type converting platform endian into big endian.
|
static Void |
SetPToBU08(
VoidPtr address
, UInt08 value
) Set a value of UInt08 type converting platform endian into big endian.
|
static Void |
SetPToBU16(
VoidPtr address
, UInt16 value
) UInt16Set a value of xxx type converting platform endian into big endian.
|
static Void |
SetPToBU32(
VoidPtr address
, UInt32 value
) Set a value of UInt32 type converting platform endian into big endian.
|
static Void |
SetPToBU64(
VoidPtr address
, UInt64 value
) UInt64Set a value of xxx type converting platform endian into big endian.
|
static Void |
SetPToLF32(
VoidPtr address
, Float32 value
) Set a value of Float32 type converting platform endian into little endian.
|
static Void |
SetPToLF64(
VoidPtr address
, Float64 value
) Set a value of Float64 type converting platform endian into little endian.
|
static Void |
SetPToLS08(
VoidPtr address
, SInt08 value
) Set a value of SInt08 type converting platform endian into little endian.
|
static Void |
SetPToLS16(
VoidPtr address
, SInt16 value
) Set a value of SInt16 type converting platform endian into little endian.
|
static Void |
SetPToLS32(
VoidPtr address
, SInt32 value
) Set a value of SInt32 type converting platform endian into little endian.
|
static Void |
SetPToLS64(
VoidPtr address
, SInt64 value
) Set a value of SInt64 type converting platform endian into little endian.
|
static Void |
SetPToLU08(
VoidPtr address
, UInt08 value
) Set a value of UInt08 type converting platform endian into little endian.
|
static Void |
SetPToLU16(
VoidPtr address
, UInt16 value
) Set a value of UInt16 type converting platform endian into little endian.
|
static Void |
SetPToLU32(
VoidPtr address
, UInt32 value
) Set a value of UInt32 type converting platform endian into little endian.
|
static Void |
SetPToLU64(
VoidPtr address
, UInt64 value
) Set a value of UInt64 type converting platform endian into little endian.
|
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the value as it is.
Return the converted value.
Return the converted value.
Return the converted value.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the value as it is.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the value as it is.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
Return the converted value.
Change to little endian if the original value is big endian, change to big endian if the original value is little endian.
[ public, static ] Float32 GetBToPF32( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be Float32Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] Float64 GetBToPF64( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be Float64Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] SInt08 GetBToPS08( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt08Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] SInt16 GetBToPS16( VoidConstPtr address );
Return the converted value.
与えられたポインターを SInt16Ptr とみなし, それが指す値をビッグ エンディアンからプラットフォームのエンディアンに変換します.
[ public, static ] SInt32 GetBToPS32( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt32Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] SInt64 GetBToPS64( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt64Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] UInt08 GetBToPU08( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt08Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] UInt16 GetBToPU16( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt16Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] UInt32 GetBToPU32( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt32Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] UInt64 GetBToPU64( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt64Ptr. The value pointed by the pointer is converted from big endian into platform endian.
[ public, static ] Float32 GetLToPF32( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be Float32Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] Float64 GetLToPF64( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be Float64Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] SInt08 GetLToPS08( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt08Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] SInt16 GetLToPS16( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt16Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] SInt32 GetLToPS32( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt32Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] SInt64 GetLToPS64( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be SInt64Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] UInt08 GetLToPU08( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt08Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] UInt16 GetLToPU16( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt16Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] UInt32 GetLToPU32( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt32Ptr. The value pointed by the pointer is converted from little endian into platform endian.
[ public, static ] UInt64 GetLToPU64( VoidConstPtr address );
Return the converted value.
The given pointer is considered to be UInt64Ptr. The value pointed by the pointer is converted from little endian into platform endian.
Return the converted value.
The nibble swap changes the upper 4 bits with the lower 4 bits of an eight bit type data.
Return the converted value.
The nibble swap changes the upper 4 bits with the lower 4 bits of an eight bit type data.
[ public, static ] Void SetPToBF32( VoidPtr address // pointer to the variable that store the converted value Float32 value // value to be converted );
A value of Float32 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be Float32Ptr.
[ public, static ] Void SetPToBF64( VoidPtr address // pointer to the variable that store the converted value Float64 value // value to be converted );
A value of Float64 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be Float64Ptr.
[ public, static ] Void SetPToBS08( VoidPtr address // pointer to the variable that store the converted value SInt08 value // value to be converted );
A value of SInt08 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be SInt08Ptr.
[ public, static ] Void SetPToBS16( VoidPtr address // pointer to the variable that store the converted value SInt16 value // value to be converted );
A value of SInt16 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be SInt16Ptr.
[ public, static ] Void SetPToBS32( VoidPtr address // pointer to the variable that store the converted value SInt32 value // value to be converted );
SInt32A value of xxx type is converted from platform endian into big endian, result is written into the memory.
address is considered to be SInt32Ptr.
[ public, static ] Void SetPToBS64( VoidPtr address // pointer to the variable that store the converted value SInt64 value // value to be converted );
A value of SInt64 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be SInt64Ptr.
[ public, static ] Void SetPToBU08( VoidPtr address // pointer to the variable that store the converted value UInt08 value // value to be converted );
A value of UInt08 type is converted from platform endian into big endian, result is written into the memory. There is no change in the UInt08 type before and after conversion.
address is considered to be UInt08Ptr.
[ public, static ] Void SetPToBU16( VoidPtr address // pointer to the variable that store the converted value UInt16 value // value to be converted );
A value of UInt16 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be UInt16Ptr.
[ public, static ] Void SetPToBU32( VoidPtr address // pointer to the variable that store the converted value UInt32 value // value to be converted );
A value of UInt32 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be UInt32Ptr.
[ public, static ] Void SetPToBU64( VoidPtr address // pointer to the variable that store the converted value UInt64 value // value to be converted );
A value of UInt64 type is converted from platform endian into big endian, result is written into the memory.
address is considered to be UInt64Ptr.
[ public, static ] Void SetPToLF32( VoidPtr address // pointer to the variable that store the converted value Float32 value // value to be converted );
A value of Float32 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be Float32Ptr.
[ public, static ] Void SetPToLF64( VoidPtr address // pointer to the variable that store the converted value Float64 value // value to be converted );
A value of Float64 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be Float64Ptr.
[ public, static ] Void SetPToLS08( VoidPtr address // pointer to the variable that store the converted value SInt08 value // value to be converted );
A value of SInt08 type is converted from platform endian into little endian, result is written into the memory. There is no change in the SInt08 type before and after conversion.
address is considered to be SInt08Ptr.
[ public, static ] Void SetPToLS16( VoidPtr address // pointer to the variable that store the converted value SInt16 value // value to be converted );
A value of SInt16 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be SInt16Ptr.
[ public, static ] Void SetPToLS32( VoidPtr address // pointer to the variable that store the converted value SInt32 value // value to be converted );
A value of SInt32 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be SInt32Ptr.
[ public, static ] Void SetPToLS64( VoidPtr address // pointer to the variable that store the converted value SInt64 value // value to be converted );
A value of SInt64 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be SInt64Ptr.
[ public, static ] Void SetPToLU08( VoidPtr address // pointer to the variable that store the converted value UInt08 value // value to be converted );
A value of UInt08 type is converted from platform endian into little endian, result is written into the memory. There is no change in the UInt08 type before and after conversion.
address is considered to be UInt08Ptr.
[ public, static ] Void SetPToLU16( VoidPtr address // pointer to the variable that store the converted value UInt16 value // value to be converted );
A value of UInt16 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be UInt16Ptr.
[ public, static ] Void SetPToLU32( VoidPtr address // pointer to the variable that store the converted value UInt32 value // value to be converted );
A value of UInt32 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be UInt32Ptr.
[ public, static ] Void SetPToLU64( VoidPtr address // pointer to the variable that store the converted value UInt64 value // value to be converted );
A value of UInt64 type is converted from platform endian into little endian, result is written into the memory.
address is considered to be UInt64Ptr.
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |