r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
rnp::EndianUtils Class Reference

Utility class for endianness conversion. More...

#include <Serializer.hpp>

+ Collaboration diagram for rnp::EndianUtils:

Static Public Member Functions

static std::uint16_t hostToNetwork16 (std::uint16_t hostValue)
 
static std::uint32_t hostToNetwork32 (std::uint32_t hostValue)
 
static float hostToNetworkFloat (float hostValue)
 
static std::uint16_t networkToHost16 (std::uint16_t networkValue)
 
static std::uint32_t networkToHost32 (std::uint32_t networkValue)
 
static float networkToHostFloat (float networkValue)
 

Detailed Description

Utility class for endianness conversion.

Definition at line 21 of file Serializer.hpp.

Member Function Documentation

◆ hostToNetwork16()

static std::uint16_t rnp::EndianUtils::hostToNetwork16 ( std::uint16_t hostValue)
inlinestatic

Definition at line 24 of file Serializer.hpp.

Referenced by networkToHost16(), and rnp::Serializer::writeUInt16().

+ Here is the caller graph for this function:

◆ hostToNetwork32()

static std::uint32_t rnp::EndianUtils::hostToNetwork32 ( std::uint32_t hostValue)
inlinestatic

Definition at line 29 of file Serializer.hpp.

Referenced by hostToNetworkFloat(), networkToHost32(), and rnp::Serializer::writeUInt32().

+ Here is the caller graph for this function:

◆ hostToNetworkFloat()

static float rnp::EndianUtils::hostToNetworkFloat ( float hostValue)
inlinestatic

Definition at line 35 of file Serializer.hpp.

References hostToNetwork32().

Referenced by networkToHostFloat(), and rnp::Serializer::writeFloat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ networkToHost16()

static std::uint16_t rnp::EndianUtils::networkToHost16 ( std::uint16_t networkValue)
inlinestatic

Definition at line 45 of file Serializer.hpp.

References hostToNetwork16().

Referenced by rnp::Serializer::readUInt16().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ networkToHost32()

static std::uint32_t rnp::EndianUtils::networkToHost32 ( std::uint32_t networkValue)
inlinestatic

Definition at line 50 of file Serializer.hpp.

References hostToNetwork32().

Referenced by rnp::Serializer::readUInt32().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ networkToHostFloat()

static float rnp::EndianUtils::networkToHostFloat ( float networkValue)
inlinestatic

Definition at line 55 of file Serializer.hpp.

References hostToNetworkFloat().

Referenced by rnp::Serializer::readFloat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: