3#include <Foundation/Basics.h>
4#include <Foundation/Math/Color.h>
5#include <Foundation/Math/Mat3.h>
6#include <Foundation/Math/Mat4.h>
7#include <Foundation/Math/Quat.h>
8#include <Foundation/Math/Transform.h>
9#include <Foundation/Strings/String.h>
10#include <Foundation/Time/Time.h>
11#include <Foundation/Types/Uuid.h>
165 template <
typename APPEND_CONTAINER_LAMBDA>
166 inline void ConvertBinaryToHex(
const void* pBinaryData, plUInt32 uiBytes, APPEND_CONTAINER_LAMBDA append);
178 out_sResult = value ?
"true" :
"false";
273 template <
typename T>
290template <
typename APPEND_CONTAINER_LAMBDA>
295 plUInt8* pBytes = (plUInt8*)pBinaryData;
297 for (plUInt32 i = 0; i < uiBytes; ++i)
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Definition DynamicArray.h:81
Definition HashTable.h:333
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
static plInt32 snprintf(char *szDst, plUInt32 uiDstSize, const char *szFormat,...)
Creates a formated string in szDst. uiDstSize defines how many bytes szDst can hold.
Definition snprintf.cpp:1062
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A class to use together with plHashedString for quick comparisons with temporary strings that need no...
Definition HashedString.h:151
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
This namespace contains functions to convert between different types.
Definition ConversionUtils.h:18
PL_FOUNDATION_DLL plResult StringToBool(plStringView sText, bool &out_bRes, const char **out_pLastParsePosition=nullptr)
Parses szString and checks that the first word it finds starts with a phrase that can be interpreted ...
Definition ConversionUtils.cpp:310
PL_FOUNDATION_DLL plColor GetColorByName(plStringView sText, bool *out_pValidColorName=nullptr)
Returns the color with the given name.
Definition ConversionUtils.cpp:871
PL_FOUNDATION_DLL plResult ConvertHexStringToUInt64(plStringView sHex, plUInt64 &out_uiResult)
Same as ConvertHexStringToUInt() with uiMaxHexCharacters set to 16.
Definition ConversionUtils.cpp:477
PL_FOUNDATION_DLL plUuid ConvertStringToUuid(plStringView sText)
Converts a string that was written with plConversionUtils::ToString(plUuid) back to an plUuid object.
Definition ConversionUtils.cpp:794
PL_FOUNDATION_DLL plUInt32 ExtractFloatsFromString(plStringView sText, plUInt32 uiNumFloats, float *out_pFloats, const char **out_pLastParsePosition=nullptr)
Parses szText and tries to find up to uiNumFloats float values to extract. Skips all characters that ...
Definition ConversionUtils.cpp:422
void ConvertBinaryToHex(const void *pBinaryData, plUInt32 uiBytes, APPEND_CONTAINER_LAMBDA append)
Converts a binary stream to a HEX string.
Definition ConversionUtils.h:291
PL_FOUNDATION_DLL plString GetColorName(const plColor &col)
The inverse of GetColorByName.
Definition ConversionUtils.cpp:1089
PL_FOUNDATION_DLL plResult ConvertHexStringToUInt32(plStringView sHex, plUInt32 &out_uiResult)
Same as ConvertHexStringToUInt() with uiMaxHexCharacters set to 8.
Definition ConversionUtils.cpp:468
PL_FOUNDATION_DLL bool IsStringUuid(plStringView sText)
Returns true when the given string is in the exact format "{ 05af8d07-0b38-44a6-8d50-49731ae2625d }...
Definition ConversionUtils.cpp:776
PL_FOUNDATION_DLL void ConvertHexToBinary(plStringView sText, plUInt8 *pBinary, plUInt32 uiBinaryBuffer)
Converts a HEX string to a binary value.
Definition ConversionUtils.cpp:530
PL_FOUNDATION_DLL plResult StringToInt(plStringView sText, plInt32 &out_iRes, const char **out_pLastParsePosition=nullptr)
Parses szString and converts it to an integer value. Returns PL_FAILURE if the string contains no par...
Definition ConversionUtils.cpp:87
PL_FOUNDATION_DLL plResult StringToInt64(plStringView sText, plInt64 &out_iRes, const char **out_pLastParsePosition=nullptr)
Same as StringToInt but converts to a 64bit integer value instead.
Definition ConversionUtils.cpp:111
PL_ALWAYS_INLINE const plStringBuilder & ToString(bool value, plStringBuilder &out_sResult)
Converts a bool to a string.
Definition ConversionUtils.h:176
PL_FOUNDATION_DLL plResult StringToUInt(plStringView sText, plUInt32 &out_uiRes, const char **out_pLastParsePosition=nullptr)
Same as StringToInt() but expects the string to be a uint32.
Definition ConversionUtils.cpp:99
PL_FOUNDATION_DLL plResult StringToFloat(plStringView sText, double &out_fRes, const char **out_pLastParsePosition=nullptr)
Parses szString and converts it to a double value. Returns PL_FAILURE if the string contains no parse...
Definition ConversionUtils.cpp:162
PL_FOUNDATION_DLL plResult ConvertHexStringToUInt(plStringView sHex, plUInt64 &out_uiResult, plUInt32 uiMaxHexCharacters, plUInt32 *pTotalCharactersParsed)
Converts a hex string (i.e. 0xAABBCCDD) into its uint64 value.
Definition ConversionUtils.cpp:482
PL_FOUNDATION_DLL plInt8 HexCharacterToIntValue(plUInt32 uiCharacter)
Converts a hex character ('0', '1', ... '9', 'A'/'a', ... 'F'/'f') to the corresponding int value 0 -...
Definition ConversionUtils.cpp:454
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12