Oxygen Engine
Modern C++ 3D Engine using OpenGL
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages Concepts
oe::util Namespace Reference

Various utilities. More...

Namespaces

namespace  pipeline
 Pipeline related classes.
 
namespace  str
 

Classes

struct  Curve
 General purpose curve (can be used for gradients, animations, etc...) More...
 
struct  CurvePoint
 
class  Factory
 
class  NonCopyable
 Prevent class to be copied. More...
 
class  Pipeline
 

Enumerations

enum class  CurveInterpolation { DIRECT , HOLD_LAST , LINEAR }
 Interpolation mode between points. More...
 

Functions

ByteArray convertUint8VectorToByteArray (const std::vector< uint8_t > &input)
 Convert a vector of uint8_t to ByteArray.
 
std::vector< uint8_t > convertByteArrayToUint8Vector (ByteSpan input)
 Convert a Byte Span to vector of uint8_t.
 
template<typename T >
convertFromByteArray (ByteSpan input)
 
template<typename T >
ByteArray convertToByteArray (const T &input)
 
std::string bytesToStr (ByteSpan input)
 
ByteArray strToBytes (std::string_view input)
 
std::string bytesToHex (ByteSpan input, bool uppercase=false)
 
ByteArray hexToBytes (const std::string &input)
 

Detailed Description

Various utilities.

Enumeration Type Documentation

◆ CurveInterpolation

enum class oe::util::CurveInterpolation
strong

Interpolation mode between points.

Enumerator
DIRECT 

No interpolation, directly switch to this value.

HOLD_LAST 

Hold last value.

LINEAR 

Do a linear interpolation between last value and this one.

Function Documentation

◆ bytesToHex()

std::string oe::util::bytesToHex ( ByteSpan  input,
bool  uppercase = false 
)

Convert byte data to an hexadecimal representation (e.g. to display hash functions results)

◆ bytesToStr()

std::string oe::util::bytesToStr ( ByteSpan  input)
inline

Convert byte data to string (note: might produce garbage characters when used with non-ASCII data)

◆ convertByteArrayToUint8Vector()

std::vector< uint8_t > oe::util::convertByteArrayToUint8Vector ( ByteSpan  input)
inline

Convert a Byte Span to vector of uint8_t.

Note
Mainly used to interact with pre-C++17 libraries

◆ convertUint8VectorToByteArray()

ByteArray oe::util::convertUint8VectorToByteArray ( const std::vector< uint8_t > &  input)
inline

Convert a vector of uint8_t to ByteArray.

Note
Mainly used to interact with pre-C++17 libraries

◆ hexToBytes()

ByteArray oe::util::hexToBytes ( const std::string &  input)

Convert an hexadecimal representation to byte data

◆ strToBytes()

ByteArray oe::util::strToBytes ( std::string_view  input)
inline

Convert string to byte data