dynamic #10

Merged
Karutoh merged 2 commits from dynamic into main 2024-07-24 01:39:29 -07:00
122 changed files with 304 additions and 295 deletions

View File

@ -239,11 +239,14 @@ endif()
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
#message("${CMAKE_CXX_FLAGS}") #message("${CMAKE_CXX_FLAGS}")
add_library(EHS ${EHS_SOURCES}) add_library(EHS_STC STATIC ${EHS_SOURCES})
add_library(EHS_DYN SHARED ${EHS_SOURCES})
add_executable(StrToHash src/StrToHash.cpp) add_executable(StrToHash src/StrToHash.cpp)
target_include_directories(EHS PUBLIC ${PROJECT_SOURCE_DIR}/include) target_compile_definitions(EHS_DYN PRIVATE EHS_LIB_EXPORT)
target_include_directories(EHS_STC PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_include_directories(EHS_DYN PUBLIC ${PROJECT_SOURCE_DIR}/include)
if (IS_OS_LINUX) if (IS_OS_LINUX)
set(CMAKE_INSTALL_PREFIX "${USER_HOME_DIRECTORY}/.local") set(CMAKE_INSTALL_PREFIX "${USER_HOME_DIRECTORY}/.local")
@ -251,12 +254,13 @@ elseif (IS_OS_WINDOWS)
set(CMAKE_INSTALL_PREFIX "${USER_HOME_DIRECTORY}/EHS") set(CMAKE_INSTALL_PREFIX "${USER_HOME_DIRECTORY}/EHS")
endif () endif ()
install(TARGETS EHS DESTINATION lib) install(TARGETS EHS_STC DESTINATION lib)
install(TARGETS EHS_DYN RUNTIME DESTINATION bin)
install(TARGETS EHS_DYN LIBRARY DESTINATION lib)
install(TARGETS StrToHash DESTINATION bin)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include)
install(TARGETS StrToHash DESTINATION bin)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
if (ZLIB_FOUND) if (ZLIB_FOUND)
message(STATUS "ZLIB was found.") message(STATUS "ZLIB was found.")
@ -271,10 +275,11 @@ else ()
message(STATUS "OpenSSL was not found.") message(STATUS "OpenSSL was not found.")
endif () endif ()
target_link_libraries(EHS OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB) target_link_libraries(EHS_STC OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB)
target_link_libraries(EHS_DYN OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB avrt ws2_32)
if (IS_OS_WINDOWS) if (IS_OS_WINDOWS)
target_link_libraries(StrToHash ws2_32 avrt EHS) target_link_libraries(StrToHash ws2_32 avrt EHS_STC)
elseif (IS_OS_LINUX) elseif (IS_OS_LINUX)
if (LINUX_WINDOW_SYSTEM STREQUAL "Wayland") if (LINUX_WINDOW_SYSTEM STREQUAL "Wayland")
target_link_libraries(StrToHash wayland-client) target_link_libraries(StrToHash wayland-client)
@ -282,5 +287,5 @@ elseif (IS_OS_LINUX)
target_link_libraries(StrToHash xcb xcb-cursor xcb-xfixes xcb-xinput) target_link_libraries(StrToHash xcb xcb-cursor xcb-xfixes xcb-xinput)
endif () endif ()
target_link_libraries(StrToHash z asound EHS) target_link_libraries(StrToHash z asound EHS_STC)
endif () endif ()

View File

@ -5,20 +5,20 @@
namespace ehs namespace ehs
{ {
class Base64 class EHS_LIB_IO Base64
{ {
private: private:
static const char ascii[]; static const char ascii[];
public: public:
static Str_8 Encode(const Str_8 input); static Str_8 Encode(const Str_8 &input);
static Str_8 Decode(const Str_8 input); static Str_8 Decode(const Str_8 &input);
private: private:
static char Find(const char c); static char Find(char c);
static bool IsBase64(const char c); static bool IsBase64(char c);
}; };
} }

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class BaseObj class EHS_LIB_IO BaseObj
{ {
private: private:
Type* hierarchy; Type* hierarchy;

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class Color3 class EHS_LIB_IO Color3
{ {
public: public:
float r; float r;
@ -13,13 +13,13 @@ namespace ehs
Color3(); Color3();
Color3(const float scalar); Color3(float scalar);
Color3(const float r, const float g, const float b); Color3(float r, float g, float b);
Color3(const Color3& color); Color3(const Color3& color);
Color3& operator=(const float scalar); Color3& operator=(float scalar);
Color3& operator=(const Color3& color); Color3& operator=(const Color3& color);
@ -27,9 +27,9 @@ namespace ehs
bool operator!=(const Color3& color) const; bool operator!=(const Color3& color) const;
float operator[](const UInt_64 i) const; float operator[](UInt_64 i) const;
float& operator[](const UInt_64 i); float& operator[](UInt_64 i);
Color3& operator*=(const Color3& color); Color3& operator*=(const Color3& color);

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class Color4 class EHS_LIB_IO Color4
{ {
public: public:
float r; float r;
@ -15,15 +15,15 @@ namespace ehs
Color4(); Color4();
Color4(const float scalar); Color4(float scalar);
explicit Color4(const Color3& color); explicit Color4(const Color3& color);
Color4(const float r, const float g, const float b, const float a = 1.0f); Color4(float r, float g, float b, float a = 1.0f);
Color4(const Color4& color); Color4(const Color4& color);
Color4& operator=(const float scalar); Color4& operator=(float scalar);
Color4& operator=(const Color3& color); Color4& operator=(const Color3& color);
@ -33,9 +33,9 @@ namespace ehs
bool operator!=(const Color4& color) const; bool operator!=(const Color4& color) const;
float operator[](const UInt_64 i) const; float operator[](UInt_64 i) const;
float& operator[](const UInt_64 i); float& operator[](UInt_64 i);
Color4& operator*=(const Color4& color); Color4& operator*=(const Color4& color);

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class Data class EHS_LIB_IO Data
{ {
public: public:
template<typename T> template<typename T>

View File

@ -21,9 +21,9 @@ namespace ehs
UINT_8 UINT_8
}; };
DataType FromAudioBitDepth(UInt_16 bitDepth); EHS_LIB_IO DataType FromAudioBitDepth(UInt_16 bitDepth);
UInt_8 ToByteDepth(DataType type); EHS_LIB_IO UInt_8 ToByteDepth(DataType type);
UInt_8 ToBitDepth(DataType type); EHS_LIB_IO UInt_8 ToBitDepth(DataType type);
} }

View File

@ -19,45 +19,47 @@ namespace ehs
SIZE SIZE
}; };
EHS_LIB_IO void Initialize(Str_8 appName, Str_8 appVerId, const Version &appVer);
EHS_LIB_IO void Uninitialize();
/// Retrieves the UTF32 C-style string as "Event Horizon Standard" /// Retrieves the UTF32 C-style string as "Event Horizon Standard"
/// @returns The result. /// @returns The result.
const Char_32* GetName_32(); EHS_LIB_IO const Char_32* GetName_32();
/// Retrieves the UTF16 C-style string as "Event Horizon Standard" /// Retrieves the UTF16 C-style string as "Event Horizon Standard"
/// @returns The result. /// @returns The result.
const Char_16* GetName_16(); EHS_LIB_IO const Char_16* GetName_16();
/// Retrieves the UTF8 C-style string as "Event Horizon Standard" /// Retrieves the UTF8 C-style string as "Event Horizon Standard"
/// @returns The result. /// @returns The result.
const Char_8* GetName_8(); EHS_LIB_IO const Char_8* GetName_8();
Str_8 GetAppName_8(); EHS_LIB_IO Str_8 GetAppName_8();
const Char_32* GetAcronym_32(); EHS_LIB_IO const Char_32* GetAcronym_32();
const Char_16* GetAcronym_16(); EHS_LIB_IO const Char_16* GetAcronym_16();
const Char_8* GetAcronym_8(); EHS_LIB_IO const Char_8* GetAcronym_8();
/// Retrieves the version identifier in UTF32. /// Retrieves the version identifier in UTF32.
/// @returns The result. /// @returns The result.
const Char_32* GetVersionId_32(); EHS_LIB_IO const Char_32* GetVersionId_32();
/// Retrieves the version identifier in UTF16. /// Retrieves the version identifier in UTF16.
/// @returns The result. /// @returns The result.
const Char_16* GetVersionId_16(); EHS_LIB_IO const Char_16* GetVersionId_16();
/// Retrieves the version identifier in UTF8. /// Retrieves the version identifier in UTF8.
/// @returns The result. /// @returns The result.
const Char_8* GetVersionId_8(); EHS_LIB_IO const Char_8* GetVersionId_8();
Str_8 GetAppVersionId_8(); EHS_LIB_IO Str_8 GetAppVersionId_8();
/// Retrieves the current Event Horizon Standard version. /// Retrieves the current Event Horizon Standard version.
/// @returns The result. /// @returns The result.
Version GetVersion(); EHS_LIB_IO Version GetVersion();
Version GetAppVersion(); EHS_LIB_IO Version GetAppVersion();
}; };
extern ehs::SInt_32 Main(ehs::Str_8* appName, ehs::Str_8* appVerId, ehs::Version* appVer);

View File

@ -9,7 +9,7 @@ namespace ehs
{ {
typedef bool (*GcLogic)(BaseObj*); typedef bool (*GcLogic)(BaseObj*);
class GC class EHS_LIB_IO GC
{ {
private: private:
static Array<GcLogic> logic; static Array<GcLogic> logic;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class HRNG class EHS_LIB_IO HRNG
{ {
public: public:
static UInt_64 GenerateSeed_u64(); static UInt_64 GenerateSeed_u64();

View File

@ -25,7 +25,7 @@ namespace ehs
/// A helper class for holding error information and handling them. /// A helper class for holding error information and handling them.
/// @tparam T The character data type to use. /// @tparam T The character data type to use.
/// @tparam N The number data type to use. /// @tparam N The number data type to use.
class Log class EHS_LIB_IO Log
{ {
private: private:
static void DefaultRaisedCb(const Log &log); static void DefaultRaisedCb(const Log &log);

View File

@ -120,7 +120,7 @@ namespace ehs
Mat2<T> GetMinor() const Mat2<T> GetMinor() const
{ {
Mat2<T> result(0); Mat2<T> result;
result.data[0] = data[3]; result.data[0] = data[3];
result.data[1] = data[2]; result.data[1] = data[2];
result.data[2] = data[1]; result.data[2] = data[1];
@ -187,7 +187,7 @@ namespace ehs
Mat2<T> GetInverse() const Mat2<T> GetInverse() const
{ {
T det = GetDeterminant(); T det = GetDeterminant();
if (Math::ComCmp(det, 0.0f)) if (Math::ComCmp(det, 0))
return {}; return {};
return GetAdjugate() * (1 / det); return GetAdjugate() * (1 / det);
@ -196,7 +196,7 @@ namespace ehs
void Inverse() void Inverse()
{ {
T det = GetDeterminant(); T det = GetDeterminant();
if (Math::ComCmp(det, 0.0f)) if (Math::ComCmp(det, 0))
return; return;
Adjugate(); Adjugate();
@ -212,6 +212,9 @@ namespace ehs
} }
}; };
template class EHS_LIB_IO Mat2<float>;
template class EHS_LIB_IO Mat2<double>;
typedef Mat2<float> Mat2_f; typedef Mat2<float> Mat2_f;
typedef Mat2<double> Mat2_d; typedef Mat2<double> Mat2_d;
} }

View File

@ -50,7 +50,7 @@ namespace ehs
Mat2<T> result; Mat2<T> result;
for (UInt_8 i = 0; i < 4; ++i) for (UInt_8 i = 0; i < 4; ++i)
result.data[i] = data[i / 2 * 4 + i % 2]; result[i] = data[i / 2 * 4 + i % 2];
return result; return result;
} }
@ -234,7 +234,7 @@ namespace ehs
Mat3<T> GetInverse() const Mat3<T> GetInverse() const
{ {
T det = GetDeterminant(); T det = GetDeterminant();
if (Math::ComCmp(det, 0.0f)) if (Math::ComCmp(det, 0))
return {}; return {};
return GetAdjugate() * (1 / det); return GetAdjugate() * (1 / det);
@ -243,7 +243,7 @@ namespace ehs
void Inverse() void Inverse()
{ {
T det = GetDeterminant(); T det = GetDeterminant();
if (Math::ComCmp(det, 0.0f)) if (Math::ComCmp(det, 0))
return; return;
Adjugate(); Adjugate();
@ -317,6 +317,9 @@ namespace ehs
} }
}; };
template class EHS_LIB_IO Mat3<float>;
template class EHS_LIB_IO Mat3<double>;
typedef Mat3<float> Mat3_f; typedef Mat3<float> Mat3_f;
typedef Mat3<double> Mat3_d; typedef Mat3<double> Mat3_d;
} }

View File

@ -268,7 +268,7 @@ namespace ehs
Mat4<T> GetInverse() const Mat4<T> GetInverse() const
{ {
T det = GetDeterminant(); T det = GetDeterminant();
if (Math::ComCmp(det, 0.0f)) if (Math::ComCmp(det, 0))
return {}; return {};
return GetAdjugate() * (1 / det); return GetAdjugate() * (1 / det);
@ -277,7 +277,7 @@ namespace ehs
void Inverse() void Inverse()
{ {
T det = GetDeterminant(); T det = GetDeterminant();
if (Math::ComCmp(det, 0.0f)) if (Math::ComCmp(det, 0))
return; return;
Adjugate(); Adjugate();
@ -421,6 +421,9 @@ namespace ehs
} }
}; };
template class EHS_LIB_IO Mat4<float>;
template class EHS_LIB_IO Mat4<double>;
typedef Mat4<float> Mat4_f; typedef Mat4<float> Mat4_f;
typedef Mat4<double> Mat4_d; typedef Mat4<double> Mat4_d;
} }

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class Math class EHS_LIB_IO Math
{ {
private: private:
static float Sqrt_AVX(const float from); static float Sqrt_AVX(const float from);
@ -26,22 +26,22 @@ namespace ehs
constexpr static double dblEpsilon = 1e-16; constexpr static double dblEpsilon = 1e-16;
/// Absolute tolerance comparison for single precision floats. /// Absolute tolerance comparison for single precision floats.
static bool AbsCmp(const float a, const float b); static bool AbsCmp(float a, float b);
/// Absolute tolerance comparison for double precision floats. /// Absolute tolerance comparison for double precision floats.
static bool AbsCmp(const double a, const double b); static bool AbsCmp(double a, double b);
/// Relative tolerance comparison for single precision floats. /// Relative tolerance comparison for single precision floats.
static bool RelCmp(const float a, const float b); static bool RelCmp(float a, float b);
/// Relative tolerance comparison for double precision floats. /// Relative tolerance comparison for double precision floats.
static bool RelCmp(const double a, const double b); static bool RelCmp(double a, double b);
/// Combined absolute and relative tolerance comparison for single precision floats. /// Combined absolute and relative tolerance comparison for single precision floats.
static bool ComCmp(const float a, const float b); static bool ComCmp(float a, float b);
/// Combined absolute and relative tolerance comparison for double precision floats. /// Combined absolute and relative tolerance comparison for double precision floats.
static bool ComCmp(const double a, const double b); static bool ComCmp(double a, double b);
template<typename T = float> template<typename T = float>
static T Max(const T a, const T b) static T Max(const T a, const T b)

View File

@ -10,9 +10,9 @@ namespace ehs
void* data; void* data;
}; };
bool HasPtrData(void* data); EHS_LIB_IO bool HasPtrData(void* data);
void AddPtrData(void* data); EHS_LIB_IO void AddPtrData(void* data);
bool RemovePtrData(void* data); EHS_LIB_IO bool RemovePtrData(void* data);
} }

View File

@ -564,7 +564,7 @@ namespace ehs
return; return;
} }
Util::Copy(data[dstOffset], src, src.Size(true)); Util::Copy(&data[dstOffset], src, src.Size(true));
} }
/// Copies a C-style string to the referenced string object. /// Copies a C-style string to the referenced string object.
@ -580,7 +580,7 @@ namespace ehs
return; return;
} }
Util::Copy(data[dstOffset], src, srcSize * sizeof(T)); Util::Copy(&data[dstOffset], src, srcSize * sizeof(T));
} }
/// Copies a C-style string to the referenced string object. /// Copies a C-style string to the referenced string object.
@ -595,7 +595,7 @@ namespace ehs
return; return;
} }
Util::Copy(data[dstOffset], src, srcSize * sizeof(T)); Util::Copy(&data[dstOffset], src, srcSize * sizeof(T));
} }
/// Inserts a string at a specified index. /// Inserts a string at a specified index.
@ -747,7 +747,7 @@ namespace ehs
T* result = new T[size + inSize + 1]; T* result = new T[size + inSize + 1];
Util::Copy(result, data, Size(true)); Util::Copy(result, data, Size(true));
Util::Copy(result[size], value, inSize * sizeof(T)); Util::Copy(&result[size], value, inSize * sizeof(T));
result[size + inSize] = 0; result[size + inSize] = 0;
@ -1027,7 +1027,7 @@ namespace ehs
/// @param [in] pattern The search pattern for optimization. /// @param [in] pattern The search pattern for optimization.
/// @param [in] result What index to return where the first instance is found. /// @param [in] result What index to return where the first instance is found.
/// @returns The index where the instance was found with the result varying from the result parameter. /// @returns The index where the instance was found with the result varying from the result parameter.
bool Find(const Str<T, N>& ide, N* const index = nullptr, const SearchPattern pattern = SearchPattern::LEFT_RIGHT, const IndexResult result = IndexResult::BEGINNING) const bool Find(const Str<T, N> &ide, N* const index = nullptr, const SearchPattern pattern = SearchPattern::LEFT_RIGHT, const IndexResult result = IndexResult::BEGINNING) const
{ {
if (pattern == SearchPattern::LEFT_RIGHT) if (pattern == SearchPattern::LEFT_RIGHT)
{ {
@ -1271,8 +1271,11 @@ namespace ehs
/// @note Use "IsNum" before this if the string object is not guaranteed to be a number. /// @note Use "IsNum" before this if the string object is not guaranteed to be a number.
float ToFloat() const float ToFloat() const
{ {
Str<T, N> ide;
ide.Push(46);
N decPoint = size; N decPoint = size;
Find(".", &decPoint); Find(ide, &decPoint);
float result = 0.0f; float result = 0.0f;
float fraction = 0.0f; float fraction = 0.0f;
@ -1297,8 +1300,11 @@ namespace ehs
/// @note Use "IsNum" before this if the string object is not guaranteed to be a number. /// @note Use "IsNum" before this if the string object is not guaranteed to be a number.
double ToDouble() const double ToDouble() const
{ {
Str<T, N> ide;
ide.Push(46);
N decPoint = size; N decPoint = size;
Find(".", &decPoint); Find(ide, &decPoint);
double result = 0.0f; double result = 0.0f;
double fraction = 0.0f; double fraction = 0.0f;
@ -1323,8 +1329,11 @@ namespace ehs
/// @note Use "IsNum" before this if the string object is not guaranteed to be a number. /// @note Use "IsNum" before this if the string object is not guaranteed to be a number.
long double ToLDouble() const long double ToLDouble() const
{ {
Str<T, N> ide;
ide.Push(46);
N decPoint = size; N decPoint = size;
Find(".", &decPoint); Find(ide, &decPoint);
long double result = 0.0f; long double result = 0.0f;
long double fraction = 0.0f; long double fraction = 0.0f;
@ -1679,7 +1688,7 @@ namespace ehs
Str<T, N> result; Str<T, N> result;
if (whole < 0) if (whole < 0)
result += "-"; result.Push(45);
result += Str<T, N>::FromNum(whole); result += Str<T, N>::FromNum(whole);
@ -1691,7 +1700,7 @@ namespace ehs
if (!fraction) if (!fraction)
return result; return result;
result += "."; result.Push(46);
Str<T, N> fResult(maxDecimals); Str<T, N> fResult(maxDecimals);
N i = 0; N i = 0;
@ -1721,7 +1730,7 @@ namespace ehs
Str<T, N> result; Str<T, N> result;
if (whole < 0) if (whole < 0)
result += "-"; result.Push(45);
result += Str<T, N>::FromNum(whole); result += Str<T, N>::FromNum(whole);
@ -1733,7 +1742,7 @@ namespace ehs
if (!fraction) if (!fraction)
return result; return result;
result += "."; result.Push(46);
Str<T, N> fResult(maxDecimals); Str<T, N> fResult(maxDecimals);
N i = 0; N i = 0;
@ -1763,7 +1772,7 @@ namespace ehs
Str<T, N> result; Str<T, N> result;
if (whole < 0) if (whole < 0)
result += "-"; result.Push(45);
result += Str<T, N>::FromNum(whole); result += Str<T, N>::FromNum(whole);
@ -1775,7 +1784,7 @@ namespace ehs
if (!fraction) if (!fraction)
return result; return result;
result += "."; result.Push(46);
Str<T, N> fResult(maxDecimals); Str<T, N> fResult(maxDecimals);
N i = 0; N i = 0;
@ -1892,6 +1901,10 @@ namespace ehs
} }
}; };
template class EHS_LIB_IO Str<Char_32, UInt_64>;
template class EHS_LIB_IO Str<Char_16, UInt_64>;
template class EHS_LIB_IO Str<Char_8, UInt_64>;
typedef Str<Char_32, UInt_64> Str_32; typedef Str<Char_32, UInt_64> Str_32;
typedef Str<Char_16, UInt_64> Str_16; typedef Str<Char_16, UInt_64> Str_16;
typedef Str<Char_8, UInt_64> Str_8; typedef Str<Char_8, UInt_64> Str_8;

View File

@ -9,7 +9,7 @@ namespace ehs
{ {
typedef void (*TaskCb)(Serializer<UInt_64>*); typedef void (*TaskCb)(Serializer<UInt_64>*);
class Task class EHS_LIB_IO Task
{ {
private: private:
bool working; bool working;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class Type class EHS_LIB_IO Type
{ {
private: private:
friend class BaseObj; friend class BaseObj;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class URI class EHS_LIB_IO URI
{ {
public: public:
/// Encodes specialized characters in the URI. /// Encodes specialized characters in the URI.

View File

@ -13,7 +13,7 @@ namespace ehs
}; };
/// A helper class for converting between UTF8, 16 and 32. /// A helper class for converting between UTF8, 16 and 32.
class UTF class EHS_LIB_IO UTF
{ {
public: public:
/// Converts the given UTF16 C-style string into UTF32. /// Converts the given UTF16 C-style string into UTF32.

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class Util class EHS_LIB_IO Util
{ {
public: public:
static bool Compare(const void* a, const void* b, UInt_64 size); static bool Compare(const void* a, const void* b, UInt_64 size);

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
/// A helper class for storing version major, minor and patch. /// A helper class for storing version major, minor and patch.
class Version class EHS_LIB_IO Version
{ {
public: public:
UInt_32 major; UInt_32 major;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class Database class EHS_LIB_IO Database
{ {
private: private:
UInt_64 hashId; UInt_64 hashId;

View File

@ -7,7 +7,7 @@ namespace ehs
{ {
class DbTable; class DbTable;
class DbObject class EHS_LIB_IO DbObject
{ {
private: private:
friend class DbTable; friend class DbTable;

View File

@ -10,7 +10,7 @@ namespace ehs
{ {
class Database; class Database;
class DbTable class EHS_LIB_IO DbTable
{ {
private: private:
friend class Database; friend class Database;

View File

@ -8,7 +8,7 @@ namespace ehs
class DbVarTmpl; class DbVarTmpl;
class DbObject; class DbObject;
class DbVar class EHS_LIB_IO DbVar
{ {
private: private:
friend class DbObject; friend class DbObject;

View File

@ -8,7 +8,7 @@ namespace ehs
{ {
class DbVar; class DbVar;
class DbVarTmpl class EHS_LIB_IO DbVarTmpl
{ {
private: private:
friend class DbTable; friend class DbTable;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class BaseDirectory class EHS_LIB_IO BaseDirectory
{ {
public: public:
static Array<Str_8> GetAllFiles(const Str_8 &dir); static Array<Str_8> GetAllFiles(const Str_8 &dir);

View File

@ -25,7 +25,7 @@ namespace ehs
}; };
/// A cross-platform wrapper class that handles native file input/output. /// A cross-platform wrapper class that handles native file input/output.
class BaseFile class EHS_LIB_IO BaseFile
{ {
protected: protected:
Str_8 path; Str_8 path;

View File

@ -11,7 +11,7 @@
namespace ehs namespace ehs
{ {
class BaseFileMonitor class EHS_LIB_IO BaseFileMonitor
{ {
protected: protected:
Str_8 filePath; Str_8 filePath;

View File

@ -18,7 +18,7 @@ namespace ehs
I_BEAM I_BEAM
}; };
class BaseWindow class EHS_LIB_IO BaseWindow
{ {
protected: protected:
bool created; bool created;

View File

@ -20,7 +20,7 @@ namespace ehs
TWO TWO
}; };
class COM class EHS_LIB_IO COM
{ {
private: private:
UInt_8 port; UInt_8 port;

View File

@ -12,7 +12,7 @@ namespace ehs
typedef int ConsoleHdl; typedef int ConsoleHdl;
#endif #endif
class Console class EHS_LIB_IO Console
{ {
private: private:
static ConsoleHdl hdlOut; static ConsoleHdl hdlOut;

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class Directory : public BaseDirectory class EHS_LIB_IO Directory : public BaseDirectory
{ {
public: public:
static Array<Str_8> GetAllFiles(const Str_8 &dir); static Array<Str_8> GetAllFiles(const Str_8 &dir);

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class Directory : public BaseDirectory class EHS_LIB_IO Directory : public BaseDirectory
{ {
public: public:
static Array<Str_8> GetAllFiles(const Str_8 &dir); static Array<Str_8> GetAllFiles(const Str_8 &dir);

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class FileMonitor : public BaseFileMonitor class EHS_LIB_IO FileMonitor : public BaseFileMonitor
{ {
private: private:
int hdl; int hdl;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class FileMonitor final : public BaseFileMonitor class EHS_LIB_IO FileMonitor final : public BaseFileMonitor
{ {
private: private:
Handle hdl; Handle hdl;

View File

@ -10,7 +10,7 @@
namespace ehs namespace ehs
{ {
class File : public BaseFile class EHS_LIB_IO File : public BaseFile
{ {
private: private:
int hdl; int hdl;

View File

@ -10,7 +10,7 @@
namespace ehs namespace ehs
{ {
class File : public BaseFile class EHS_LIB_IO File : public BaseFile
{ {
private: private:
HANDLE hdl; HANDLE hdl;

View File

@ -10,7 +10,7 @@
namespace ehs namespace ehs
{ {
class FontAtlas : public BaseObj class EHS_LIB_IO FontAtlas : public BaseObj
{ {
private: private:
UInt_64 hashId; UInt_64 hashId;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class Glyph class EHS_LIB_IO Glyph
{ {
private: private:
Char_32 code; Char_32 code;

View File

@ -8,7 +8,7 @@
namespace ehs namespace ehs
{ {
class RIFF class EHS_LIB_IO RIFF
{ {
private: private:
Str_8 type; Str_8 type;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class RIFF_Chunk class EHS_LIB_IO RIFF_Chunk
{ {
private: private:
Str_8 id; Str_8 id;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class Resource : public BaseObj class EHS_LIB_IO Resource : public BaseObj
{ {
private: private:
ehs::UInt_64 hashId; ehs::UInt_64 hashId;

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class UsbBase class EHS_LIB_IO UsbBase
{ {
private: private:
UInt_32 bus; UInt_32 bus;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class Usb final : public UsbBase class EHS_LIB_IO Usb final : public UsbBase
{ {
private: private:
int hdl; int hdl;

View File

@ -14,7 +14,7 @@
namespace ehs namespace ehs
{ {
class Window : public BaseWindow class EHS_LIB_IO Window : public BaseWindow
{ {
private: private:
UInt_32 owner; UInt_32 owner;
@ -71,13 +71,6 @@ namespace ehs
void SetIcon(const Str_8& filePath); void SetIcon(const Str_8& filePath);
/// Sets the windows client scale.
/// @param [in] w The width in pixels.
/// @param [in] h The height in pixels.
void SetClientSize(const Vec2<UInt_32>& size);
Vec2<UInt_32> GetClientSize();
/// Gets the windows native handle for the operating system or other native tasks. /// Gets the windows native handle for the operating system or other native tasks.
/// @returns The window's native handle. /// @returns The window's native handle.
HWND GetHdl() const; HWND GetHdl() const;

View File

@ -8,7 +8,7 @@
namespace ehs namespace ehs
{ {
class Window : public BaseWindow class EHS_LIB_IO Window : public BaseWindow
{ {
protected: protected:
wl_display *display; wl_display *display;

View File

@ -8,7 +8,7 @@
namespace ehs namespace ehs
{ {
class Window : public BaseWindow class EHS_LIB_IO Window : public BaseWindow
{ {
protected: protected:
friend class Input; friend class Input;

View File

@ -11,7 +11,7 @@
namespace ehs namespace ehs
{ {
class Audio : public Resource class EHS_LIB_IO Audio : public Resource
{ {
private: private:
static Array<AudioCodec> codecs; static Array<AudioCodec> codecs;

View File

@ -8,7 +8,7 @@ namespace ehs
{ {
class Audio; class Audio;
class AudioCodec class EHS_LIB_IO AudioCodec
{ {
private: private:
Str_8 id; Str_8 id;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class AudioDevice : public BaseAudioDevice class EHS_LIB_IO AudioDevice : public BaseAudioDevice
{ {
private: private:
snd_pcm_t* hdl; snd_pcm_t* hdl;

View File

@ -12,7 +12,7 @@ struct IMMDevice;
namespace ehs namespace ehs
{ {
class AudioDevice : public BaseAudioDevice class EHS_LIB_IO AudioDevice : public BaseAudioDevice
{ {
private: private:
IMMDevice* hdl; IMMDevice* hdl;

View File

@ -23,7 +23,7 @@ namespace ehs
UNPLUGGED = 0x8 UNPLUGGED = 0x8
}; };
class BaseAudioDevice class EHS_LIB_IO BaseAudioDevice
{ {
protected: protected:
AudioDeviceType type; AudioDeviceType type;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class Button class EHS_LIB_IO Button
{ {
private: private:
Str_8 name; Str_8 name;

View File

@ -13,7 +13,7 @@ namespace ehs
TOUCHED TOUCHED
}; };
class ButtonState class EHS_LIB_IO ButtonState
{ {
private: private:
Button button; Button button;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class HID class EHS_LIB_IO HID
{ {
protected: protected:
UInt_8 type; UInt_8 type;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class Input class EHS_LIB_IO Input
{ {
private: private:
Array<InputHandler*> handlers; Array<InputHandler*> handlers;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class InputHandler class EHS_LIB_IO InputHandler
{ {
private: private:
UInt_64 hashId; UInt_64 hashId;

View File

@ -8,7 +8,7 @@
namespace ehs namespace ehs
{ {
class Keyboard : public HID class EHS_LIB_IO Keyboard : public HID
{ {
public: public:
Keyboard(); Keyboard();

View File

@ -9,7 +9,7 @@
namespace ehs namespace ehs
{ {
class Mouse : public HID class EHS_LIB_IO Mouse : public HID
{ {
private: private:
friend class Input; friend class Input;

View File

@ -13,7 +13,7 @@ namespace ehs
NEAREST_NEIGHBOR NEAREST_NEIGHBOR
}; };
class Img : public BaseObj class EHS_LIB_IO Img : public BaseObj
{ {
private: private:
static Array<ImgCodec> codecs; static Array<ImgCodec> codecs;

View File

@ -12,7 +12,7 @@ namespace ehs
typedef bool (*EncodeImgCb)(const ImgCodec* const, Serializer<UInt_64>&, const Img*); typedef bool (*EncodeImgCb)(const ImgCodec* const, Serializer<UInt_64>&, const Img*);
typedef bool (*DecodeImgCb)(const ImgCodec* const, Serializer<UInt_64>&, Img*); typedef bool (*DecodeImgCb)(const ImgCodec* const, Serializer<UInt_64>&, Img*);
class ImgCodec class EHS_LIB_IO ImgCodec
{ {
private: private:
Str_8 id; Str_8 id;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class PNG class EHS_LIB_IO PNG
{ {
private: private:
Str_8 id; Str_8 id;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class PNG_Chunk class EHS_LIB_IO PNG_Chunk
{ {
private: private:
Str_8 id; Str_8 id;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class AnimBone class EHS_LIB_IO AnimBone
{ {
private: private:
UInt_8 boneId; UInt_8 boneId;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class Animation class EHS_LIB_IO Animation
{ {
private: private:
UInt_64 hashId; UInt_64 hashId;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class Bone class EHS_LIB_IO Bone
{ {
private: private:
UInt_64 hashName; UInt_64 hashName;

View File

@ -9,7 +9,7 @@
namespace ehs namespace ehs
{ {
class KeyFrame class EHS_LIB_IO KeyFrame
{ {
private: private:
float num; float num;

View File

@ -15,7 +15,7 @@ namespace ehs
EHM EHM
}; };
class Mdl : public BaseObj class EHS_LIB_IO Mdl : public BaseObj
{ {
private: private:
static Array<MdlCodec> codecs; static Array<MdlCodec> codecs;

View File

@ -12,7 +12,7 @@ namespace ehs
typedef bool (*EnocdeMdlCb)(const MdlCodec*, Serializer<UInt_64>&, const Mdl*); typedef bool (*EnocdeMdlCb)(const MdlCodec*, Serializer<UInt_64>&, const Mdl*);
typedef bool (*DecodeMdlCb)(const MdlCodec*, Serializer<UInt_64>&, Mdl*); typedef bool (*DecodeMdlCb)(const MdlCodec*, Serializer<UInt_64>&, Mdl*);
class MdlCodec class EHS_LIB_IO MdlCodec
{ {
private: private:
Str_8 id; Str_8 id;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class Mesh final : public BaseObj class EHS_LIB_IO Mesh final : public BaseObj
{ {
protected: protected:
UInt_64 hashId; UInt_64 hashId;

View File

@ -19,7 +19,7 @@ namespace ehs
INVALID INVALID
}; };
class PropertyChange class EHS_LIB_IO PropertyChange
{ {
public: public:
ChangeType type; ChangeType type;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class BaseDNS class EHS_LIB_IO BaseDNS
{ {
public: public:
static Str_8 Resolve(AddrType type, const Str_8 &hostname); static Str_8 Resolve(AddrType type, const Str_8 &hostname);

View File

@ -9,7 +9,7 @@
namespace ehs namespace ehs
{ {
class BaseTCP class EHS_LIB_IO BaseTCP
{ {
protected: protected:
AddrType addrType; AddrType addrType;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class BaseUDP class EHS_LIB_IO BaseUDP
{ {
protected: protected:
AddrType type; AddrType type;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class DNS final : public BaseDNS class EHS_LIB_IO DNS final : public BaseDNS
{ {
public: public:
static Str_8 Resolve(AddrType type, const Str_8 &hostname); static Str_8 Resolve(AddrType type, const Str_8 &hostname);

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class DNS final : public BaseDNS class EHS_LIB_IO DNS final : public BaseDNS
{ {
public: public:
static Str_8 Resolve(AddrType type, const Str_8 &hostname); static Str_8 Resolve(AddrType type, const Str_8 &hostname);

View File

@ -16,7 +16,7 @@ namespace ehs
DEL DEL
}; };
class Request class EHS_LIB_IO Request
{ {
private: private:
Verb verb; Verb verb;

View File

@ -8,7 +8,7 @@
namespace ehs namespace ehs
{ {
class Response class EHS_LIB_IO Response
{ {
private: private:
UInt_32 code; UInt_32 code;

View File

@ -12,7 +12,7 @@ typedef struct ssl_st SSL;
namespace ehs namespace ehs
{ {
/// A class for handling the HTTP(S) TCP socket layer. /// A class for handling the HTTP(S) TCP socket layer.
class SSL : public TCP class EHS_LIB_IO SSL : public TCP
{ {
private: private:
SSL_CTX* ctx; SSL_CTX* ctx;

View File

@ -10,7 +10,7 @@
namespace ehs namespace ehs
{ {
/// A wrapper class for the transmission control protocol socket. /// A wrapper class for the transmission control protocol socket.
class TCP : public BaseTCP class EHS_LIB_IO TCP : public BaseTCP
{ {
protected: protected:
Socket hdl; Socket hdl;

View File

@ -10,7 +10,7 @@
namespace ehs namespace ehs
{ {
/// A wrapper class for the transmission control protocol socket. /// A wrapper class for the transmission control protocol socket.
class TCP : public BaseTCP class EHS_LIB_IO TCP : public BaseTCP
{ {
protected: protected:
Socket hdl; Socket hdl;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
/// A wrapper class for the user datagram protocol socket. /// A wrapper class for the user datagram protocol socket.
class UDP : public BaseUDP class EHS_LIB_IO UDP : public BaseUDP
{ {
private: private:
Socket hdl; Socket hdl;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
/// A wrapper class for the user datagram protocol socket. /// A wrapper class for the user datagram protocol socket.
class UDP : public BaseUDP class EHS_LIB_IO UDP : public BaseUDP
{ {
private: private:
Socket hdl; Socket hdl;

View File

@ -21,7 +21,7 @@ namespace ehs
Str_8 id; Str_8 id;
}; };
class Spotify final class EHS_LIB_IO Spotify final
{ {
private: private:
SSL client; SSL client;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class Twitch class EHS_LIB_IO Twitch
{ {
private: private:
SSL client; SSL client;

View File

@ -6,7 +6,7 @@
namespace ehs namespace ehs
{ {
class TwitchChat class EHS_LIB_IO TwitchChat
{ {
private: private:
TCP client; TCP client;

View File

@ -12,7 +12,7 @@
namespace ehs namespace ehs
{ {
class Json class EHS_LIB_IO Json
{ {
private: private:
JsonBase* value; JsonBase* value;

View File

@ -11,7 +11,7 @@ namespace ehs
class JsonNum; class JsonNum;
class JsonStr; class JsonStr;
class JsonArray : public JsonBase class EHS_LIB_IO JsonArray : public JsonBase
{ {
private: private:
UInt_64 size; UInt_64 size;

View File

@ -15,7 +15,7 @@ namespace ehs
STR STR
}; };
class JsonBase class EHS_LIB_IO JsonBase
{ {
private: private:
JsonType type; JsonType type;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class JsonBool : public JsonBase class EHS_LIB_IO JsonBool : public JsonBase
{ {
public: public:
bool value; bool value;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class JsonNum : public JsonBase class EHS_LIB_IO JsonNum : public JsonBase
{ {
public: public:
float value; float value;

View File

@ -9,7 +9,7 @@ namespace ehs
{ {
class JsonVar; class JsonVar;
class JsonObj : public JsonBase class EHS_LIB_IO JsonObj : public JsonBase
{ {
protected: protected:
UInt_64 size; UInt_64 size;

View File

@ -7,7 +7,7 @@
namespace ehs namespace ehs
{ {
class JsonStr : public JsonBase class EHS_LIB_IO JsonStr : public JsonBase
{ {
public: public:
Str_8 value; Str_8 value;

View File

@ -12,7 +12,7 @@ namespace ehs
class JsonNum; class JsonNum;
class JsonStr; class JsonStr;
class JsonVar class EHS_LIB_IO JsonVar
{ {
private: private:
UInt_64 hashId; UInt_64 hashId;

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class BaseMutex class EHS_LIB_IO BaseMutex
{ {
protected: protected:
bool initialized; bool initialized;

View File

@ -4,7 +4,7 @@
namespace ehs namespace ehs
{ {
class BaseOpen class EHS_LIB_IO BaseOpen
{ {
protected: protected:
Str_8 filePath; Str_8 filePath;

View File

@ -5,7 +5,7 @@
namespace ehs namespace ehs
{ {
class BaseSemaphore class EHS_LIB_IO BaseSemaphore
{ {
private: private:
Str_8 name; Str_8 name;

Some files were not shown because too many files have changed in this diff Show More