CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Utility.hpp File Reference
#include "CeresEngine/DataTypes.hpp"
#include "CeresEngine/Foundation/SmartPtr.hpp"
#include "CeresEngine/Foundation/String.hpp"
#include "CeresEngine/Foundation/StringStream.hpp"
#include <algorithm>
#include <bit>
#include <cctype>
#include <cmath>
#include <concepts>
#include <functional>
#include <iomanip>
#include <iterator>
#include <memory>
#include <sstream>
#include <type_traits>

Go to the source code of this file.

Classes

struct  CeresEngine::impl::ByteSwapper< Endian, T >
 
struct  CeresEngine::impl::ByteSwapper< Endian::Native, T >
 

Namespaces

namespace  CeresEngine
 
namespace  CeresEngine::impl
 Helper functions for comparing iterators.
 

Enumerations

enum class  CeresEngine::Endian { CeresEngine::Big = UInt8(std::endian::big) , CeresEngine::Little = UInt8(std::endian::little) , CeresEngine::Native = UInt8(std::endian::native) }
 A enumeration for possible endinesses. More...
 

Functions

template<typename TCollection , typename TValue >
void CeresEngine::eraseAll (TCollection &collection, const TValue &value)
 
template<typename TCollection , typename TPredicate >
void CeresEngine::eraseAllIf (TCollection &collection, TPredicate pred)
 
template<typename TCollectionSrc , typename TCollectionDest >
void CeresEngine::moveAll (TCollectionSrc &src, TCollectionDest &dst)
 
template<typename TCollectionSrc , typename TCollectionDest , typename TPredicate >
void CeresEngine::moveAllIf (TCollectionSrc &src, TCollectionDest &dst, TPredicate pred)
 
template<class CharT , class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
void CeresEngine::replace (std::basic_string< CharT, Traits, Allocator > &s, const std::basic_string< CharT, Traits, Allocator > &from, const std::basic_string< CharT, Traits, Allocator > &to)
 
template<class CharT , class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
void CeresEngine::replace (std::basic_string< CharT, Traits, Allocator > &s, const char *from, const char *to)
 
template<class CharT , class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
void CeresEngine::replace (std::basic_string< CharT, Traits, Allocator > &s, const std::basic_string< CharT, Traits, Allocator > &from, const char *to)
 
template<class CharT , class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT>>
void CeresEngine::replace (std::basic_string< CharT, Traits, Allocator > &s, const char *from, const std::basic_string< CharT, Traits, Allocator > &to)
 
template<typename T >
T CeresEngine::fromStringOrDefault (const StringView &s)
 
bool CeresEngine::isHexLiteral (const StringView &s)
 
template<>
int CeresEngine::fromStringOrDefault< int > (const StringView &s)
 
template<>
long long CeresEngine::fromStringOrDefault< long long > (const StringView &s)
 
template<>
unsigned long CeresEngine::fromStringOrDefault< unsigned long > (const StringView &s)
 
template<>
float CeresEngine::fromStringOrDefault< float > (const StringView &s)
 
template<>
double CeresEngine::fromStringOrDefault< double > (const StringView &s)
 
template<typename T >
void CeresEngine::toUpper (T &s)
 
template<typename T , typename Allocator >
void CeresEngine::mergeString (BasicString< T, Allocator > &dst, const BasicString< T, Allocator > &src, const T &keepDst, const T &ignoreSrc)
 Merges the source string 'src' into the destination string 'dst', keeps the destination characters specified by 'keepDst', and ignores the source characters specified by 'ignoreSrc'.
 
template<typename T >
String CeresEngine::toHexString (const T &i, const String &prefix="0x")
 
template<typename T >
int CeresEngine::numDigits (T n)
 
template<typename T >
SPtr< TCeresEngine::exchangeWithNull (SPtr< T > &ptr)
 
template<Endian E, typename T >
requires (std::is_trivially_copyable_v<T>)
T CeresEngine::byteswap (T u)
 Swaps the byte to/from the native byte-order to the target E byte-order.