refactor: refactor project

- rename LIBCMO_DISABLE_COPY_MOVE -> YYCC_DEL_CLS_COPY_MOVE and LIBCMO_DEFAULT_COPY_MOVE -> YYCC_DEF_CLS_COPY_MOVE.
- fix Vector declaration generator. throw exception when operator[] face invalid index, instead of do fallback.
- rename VTAll.hpp -> VTInternal.hpp and VYUserAll -> VTAll.hpp for easy to understand.
- fix project name error in Doxygen template.
- replace all LIBCMO_OS_WIN32 to YYCC_OS == YYCC_OS_WINDOWS.
- fix some compile error (involving utf8 encoding) but not the final result.
- use correct way to include std-image library (use <> instead of "")
- finish documentation for VTUtils.hpp and VTEncoding.hpp.
This commit is contained in:
2024-08-17 20:43:27 +08:00
parent f870d4dde3
commit e682a87d25
43 changed files with 491 additions and 337 deletions

View File

@ -1,6 +1,6 @@
#pragma once
#include "../VTAll.hpp"
#include "../VTInternal.hpp"
#include <memory>
#include <functional>
#include <type_traits>
@ -54,7 +54,7 @@ namespace LibCmo::CK2 {
LockedReadBufferDeleter() : m_Host(nullptr), m_ConsumedSize(0) {}
LockedReadBufferDeleter(CKStateChunk* host, CKDWORD init_size) :
m_Host(host), m_ConsumedSize(init_size) {}
LIBCMO_DEFAULT_COPY_MOVE(LockedReadBufferDeleter);
YYCC_DEF_CLS_COPY_MOVE(LockedReadBufferDeleter);
void operator()(LIBCMO_UNUSED const void* buf);
void SetConsumedSize(CKDWORD newsize);
@ -68,7 +68,7 @@ namespace LibCmo::CK2 {
LockedWriteBufferDeleter() : m_Host(nullptr), m_ConsumedSize(0) {}
LockedWriteBufferDeleter(CKStateChunk* host, CKDWORD init_size) :
m_Host(host), m_ConsumedSize(init_size) {}
LIBCMO_DEFAULT_COPY_MOVE(LockedWriteBufferDeleter);
YYCC_DEF_CLS_COPY_MOVE(LockedWriteBufferDeleter);
void operator()(LIBCMO_UNUSED const void* buf);
void SetConsumedSize(CKDWORD newsize);
@ -82,7 +82,7 @@ namespace LibCmo::CK2 {
BufferDeleter() : m_Host(nullptr), m_BufSize(0) {}
BufferDeleter(CKStateChunk* host, CKDWORD bufsize) :
m_Host(host), m_BufSize(bufsize) {}
LIBCMO_DEFAULT_COPY_MOVE(BufferDeleter);
YYCC_DEF_CLS_COPY_MOVE(BufferDeleter);
void operator()(const void* buf);
CKDWORD GetBufferSize() const;