- endian [4]
The endianness that the program was compiled for.
- EndianSwapper(T) if (isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool) || is(Unqual!(T) == float) || is(Unqual!(T) == double)) [3]
- append(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isOutputRange!(R,ubyte)) [3]
Takes an integral value, converts it to the given endianness, and appends
it to the given range of $(D ubyte)s (using $(D put)) as a sequence of
$(D T.sizeof) $(D ubyte)s starting at index. $(D hasSlicing!R) must be
$(D true).
- bigEndianToNative(T,uint n) if ((isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool) || is(Unqual!(T) == float) || is(Unqual!(T) == double)) && n == T.sizeof) [3]
Converts the given value from big endian to the native endianness and
returns it. The value is given as a $(D ubyte[n]) where $(D n) is the size
of the target type. You must give the target type as a template argument,
because there are multiple types with the same size and so the type of the
argument is not enough to determine the return type.
- bigEndianToNativeImpl(T,uint n) if ((is(Unqual!(T) == float) || is(Unqual!(T) == double)) && n == T.sizeof) [3]
- bigEndianToNativeImpl(T,uint n) if ((isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool)) && n == T.sizeof) [3]
- floatEndianImpl(T,bool swap) if (is(Unqual!(T) == float) || is(Unqual!(T) == double)) [3]
- floatEndianImpl(uint n,bool swap) if (n == 4 || n == 8) [3]
- littleEndianToNative(T,uint n) if ((isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool) || is(Unqual!(T) == float) || is(Unqual!(T) == double)) && n == T.sizeof) [3]
Converts the given value from little endian to the native endianness and
returns it. The value is given as a $(D ubyte[n]) where $(D n) is the size
of the target type. You must give the target type as a template argument,
because there are multiple types with the same size and so the type of the
argument is not enough to determine the return type.
- littleEndianToNativeImpl(T,uint n) if ((is(Unqual!(T) == float) || is(Unqual!(T) == double)) && n == T.sizeof) [3]
- littleEndianToNativeImpl(T,uint n) if ((isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool)) && n == T.sizeof) [3]
- nativeToBigEndian(T) if (isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool) || is(Unqual!(T) == float) || is(Unqual!(T) == double)) [3]
Converts the given value from the native endianness to big endian and
returns it as a $(D ubyte[n]) where $(D n) is the size of the given type.
- nativeToBigEndianImpl(T) if (is(Unqual!(T) == float) || is(Unqual!(T) == double)) [3]
- nativeToBigEndianImpl(T) if (isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool)) [3]
- nativeToLittleEndian(T) if (isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool) || is(Unqual!(T) == float) || is(Unqual!(T) == double)) [3]
Converts the given value from the native endianness to little endian and
returns it as a $(D ubyte[n]) where $(D n) is the size of the given type.
- nativeToLittleEndianImpl(T) if (is(Unqual!(T) == float) || is(Unqual!(T) == double)) [3]
- nativeToLittleEndianImpl(T) if (isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool)) [3]
- peek(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isForwardRange!(R) && hasSlicing!(R) && is(ElementType!(R) : const(ubyte))) [3]
Takes a range of $(D ubyte)s and converts the first $(D T.sizeof) bytes to
$(D T). The value returned is converted from the given endianness to the
native endianness. The range is not consumed.
- peek(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isForwardRange!(R) && hasSlicing!(R) && is(ElementType!(R) : const(ubyte))) [3]
Takes a range of $(D ubyte)s and converts the first $(D T.sizeof) bytes to
$(D T). The value returned is converted from the given endianness to the
native endianness. The range is not consumed.
- peek(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isForwardRange!(R) && is(ElementType!(R) : const(ubyte))) [3]
Takes a range of $(D ubyte)s and converts the first $(D T.sizeof) bytes to
$(D T). The value returned is converted from the given endianness to the
native endianness. The range is not consumed.
- read(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isInputRange!(R) && is(ElementType!(R) : const(ubyte))) [3]
Takes a range of $(D ubyte)s and converts the first $(D T.sizeof) bytes to
$(D T). The value returned is converted from the given endianness to the
native endianness. The $(D T.sizeof) bytes which are read are consumed from
the range.
- swapEndian(T) if (isIntegral!(T) || isSomeChar!(T) || is(Unqual!(T) == bool)) [3]
Swaps the endianness of the given integral value or character.
- write(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isForwardRange!(R) && hasSlicing!(R) && is(ElementType!(R) : ubyte)) [3]
Takes an integral value, converts it to the given endianness, and writes it
to the given range of $(D ubyte)s as a sequence of $(D T.sizeof) $(D ubyte)s
starting at index. $(D hasSlicing!R) must be $(D true).
- write(T,Endian endianness = Endian.bigEndian,R) if (isIntegral!(T) && isForwardRange!(R) && hasSlicing!(R) && is(ElementType!(R) : ubyte)) [3]
Takes an integral value, converts it to the given endianness, and writes it
to the given range of $(D ubyte)s as a sequence of $(D T.sizeof) $(D ubyte)s
starting at index. $(D hasSlicing!R) must be $(D true).
- BOMEndian [3]
- EndianStream [3]
This subclass wraps a stream with big-endian or little-endian byte order
swapping.
- Endian [3]
Byte order endianness.