-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed endianness to implicitly resolve system byte order.
- Loading branch information
Showing
3 changed files
with
18 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
// <copyright file="endianness.h" company="Visualisierungsinstitut der Universität Stuttgart"> | ||
// Copyright © 2017 Visualisierungsinstitut der Universität Stuttgart. Alle Rechte vorbehalten. | ||
// Copyright © 2017 - 2023 Visualisierungsinstitut der Universität Stuttgart. Alle Rechte vorbehalten. | ||
// </copyright> | ||
// <author>Christoph Müller</author> | ||
|
||
#pragma once | ||
|
||
#include <cinttypes> | ||
|
||
|
||
namespace datraw { | ||
|
||
/// <summary> | ||
/// Represents endianness of a data set or system. | ||
/// </summary> | ||
enum class endianness { | ||
enum class endianness : std::uint32_t { | ||
|
||
/// <summary> | ||
/// The least significant byte is stored first, like on Intel x86 or | ||
/// AMD64 architectures. | ||
/// </summary> | ||
little = 1, | ||
little = 0x03020100, | ||
|
||
/// <summary> | ||
/// The most significant byte is stored first, like on Sun Spark. | ||
/// </summary> | ||
big | ||
big = 0x00010203, | ||
|
||
/// <summary> | ||
/// The native endian of the system the code is running on. | ||
/// </summary> | ||
system = '\0\1\2\3' | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters