diff --git a/Sources/Jazz2.vcxproj b/Sources/Jazz2.vcxproj index dbbadd28..f14b7b83 100644 --- a/Sources/Jazz2.vcxproj +++ b/Sources/Jazz2.vcxproj @@ -695,6 +695,7 @@ + diff --git a/Sources/Jazz2.vcxproj.filters b/Sources/Jazz2.vcxproj.filters index 2ad6861b..19ea5a42 100644 --- a/Sources/Jazz2.vcxproj.filters +++ b/Sources/Jazz2.vcxproj.filters @@ -1482,6 +1482,9 @@ Header Files\Shared\IO + + Header Files\Shared\Base + diff --git a/Sources/Shared/Base/IDisposable.h b/Sources/Shared/Base/IDisposable.h new file mode 100644 index 00000000..64b6a56b --- /dev/null +++ b/Sources/Shared/Base/IDisposable.h @@ -0,0 +1,18 @@ +#pragma once + +namespace Death { +//###==##====#=====--==~--~=~- --- -- - - - - + + /** + @brief Provides base interface for releasing resources on object destruction + */ + class IDisposable + { + public: + IDisposable() {} + virtual ~IDisposable() = 0; + }; + + inline IDisposable::~IDisposable() {} + +} \ No newline at end of file diff --git a/Sources/Shared/IO/FileAccessMode.h b/Sources/Shared/IO/FileAccessMode.h index 42fb4bc6..17c0ed95 100644 --- a/Sources/Shared/IO/FileAccessMode.h +++ b/Sources/Shared/IO/FileAccessMode.h @@ -5,7 +5,9 @@ namespace Death { namespace IO { //###==##====#=====--==~--~=~- --- -- - - - - - /** @brief Defines constants for read, write, or read/write access to a file */ + /** + @brief Defines constants for read, write, or read/write access to a file + */ enum struct FileAccessMode { None = 0, Read = 0x01, diff --git a/Sources/Shared/IO/Stream.h b/Sources/Shared/IO/Stream.h index c7b3070a..a88fccbe 100644 --- a/Sources/Shared/IO/Stream.h +++ b/Sources/Shared/IO/Stream.h @@ -12,7 +12,7 @@ #endif #include "../Common.h" -#include "../IDisposable.h" +#include "../Base/IDisposable.h" #include // For FILE #include diff --git a/cmake/ncine_headers.cmake b/cmake/ncine_headers.cmake index d287ce1e..602dcf8d 100644 --- a/cmake/ncine_headers.cmake +++ b/cmake/ncine_headers.cmake @@ -11,6 +11,7 @@ set(HEADERS ${NCINE_SOURCE_DIR}/Shared/IntrinsicsSse4.h ${NCINE_SOURCE_DIR}/Shared/IntrinsicsSsse3.h ${NCINE_SOURCE_DIR}/Shared/Utf8.h + ${NCINE_SOURCE_DIR}/Shared/Base/IDisposable.h ${NCINE_SOURCE_DIR}/Shared/Base/TypeInfo.h ${NCINE_SOURCE_DIR}/Shared/Base/Unaligned.h ${NCINE_SOURCE_DIR}/Shared/Containers/Array.h