From fa32a95be56f368b0fa0919f070e4864e7cbda2a Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 14 Dec 2025 17:16:05 -0500 Subject: [PATCH] xo-alloc2: header reorg redux --- include/xo/alloc2/Allocator.hpp | 7 ++++--- include/xo/alloc2/{ => alloc}/AAllocator.hpp | 0 include/xo/alloc2/{ => alloc}/AllocatorError.hpp | 0 include/xo/alloc2/{ => alloc}/IAllocator_Any.hpp | 0 include/xo/alloc2/{ => alloc}/IAllocator_Xfer.hpp | 0 include/xo/alloc2/{ => alloc}/RAllocator.hpp | 0 include/xo/alloc2/alloc/README | 4 ++++ include/xo/alloc2/arena/ArenaConfig.hpp | 2 +- include/xo/alloc2/{ => arena}/IAllocator_DArena.hpp | 4 ++-- src/alloc2/AAllocator.cpp | 2 +- src/alloc2/DArena.cpp | 2 +- src/alloc2/IAllocator_Any.cpp | 2 +- src/alloc2/IAllocator_DArena.cpp | 2 +- utest/arena.test.cpp | 6 +++--- 14 files changed, 18 insertions(+), 13 deletions(-) rename include/xo/alloc2/{ => alloc}/AAllocator.hpp (100%) rename include/xo/alloc2/{ => alloc}/AllocatorError.hpp (100%) rename include/xo/alloc2/{ => alloc}/IAllocator_Any.hpp (100%) rename include/xo/alloc2/{ => alloc}/IAllocator_Xfer.hpp (100%) rename include/xo/alloc2/{ => alloc}/RAllocator.hpp (100%) create mode 100644 include/xo/alloc2/alloc/README rename include/xo/alloc2/{ => arena}/IAllocator_DArena.hpp (97%) diff --git a/include/xo/alloc2/Allocator.hpp b/include/xo/alloc2/Allocator.hpp index ee5e709f..63ffdb2e 100644 --- a/include/xo/alloc2/Allocator.hpp +++ b/include/xo/alloc2/Allocator.hpp @@ -5,8 +5,9 @@ #pragma once -#include "AAllocator.hpp" -#include "IAllocator_Any.hpp" -#include "RAllocator.hpp" +#include "alloc/AAllocator.hpp" +#include "alloc/IAllocator_Any.hpp" +#include "alloc/IAllocator_Xfer.hpp" +#include "alloc/RAllocator.hpp" /* end Allocator.hpp */ diff --git a/include/xo/alloc2/AAllocator.hpp b/include/xo/alloc2/alloc/AAllocator.hpp similarity index 100% rename from include/xo/alloc2/AAllocator.hpp rename to include/xo/alloc2/alloc/AAllocator.hpp diff --git a/include/xo/alloc2/AllocatorError.hpp b/include/xo/alloc2/alloc/AllocatorError.hpp similarity index 100% rename from include/xo/alloc2/AllocatorError.hpp rename to include/xo/alloc2/alloc/AllocatorError.hpp diff --git a/include/xo/alloc2/IAllocator_Any.hpp b/include/xo/alloc2/alloc/IAllocator_Any.hpp similarity index 100% rename from include/xo/alloc2/IAllocator_Any.hpp rename to include/xo/alloc2/alloc/IAllocator_Any.hpp diff --git a/include/xo/alloc2/IAllocator_Xfer.hpp b/include/xo/alloc2/alloc/IAllocator_Xfer.hpp similarity index 100% rename from include/xo/alloc2/IAllocator_Xfer.hpp rename to include/xo/alloc2/alloc/IAllocator_Xfer.hpp diff --git a/include/xo/alloc2/RAllocator.hpp b/include/xo/alloc2/alloc/RAllocator.hpp similarity index 100% rename from include/xo/alloc2/RAllocator.hpp rename to include/xo/alloc2/alloc/RAllocator.hpp diff --git a/include/xo/alloc2/alloc/README b/include/xo/alloc2/alloc/README new file mode 100644 index 00000000..6efbf852 --- /dev/null +++ b/include/xo/alloc2/alloc/README @@ -0,0 +1,4 @@ +AAllocator |<-- IAllocator_Any (D=DVariantPlaceholder) + |<-- IAllocator_Xfer + +OObject |<-- RAllocator diff --git a/include/xo/alloc2/arena/ArenaConfig.hpp b/include/xo/alloc2/arena/ArenaConfig.hpp index f93b0873..9da3e211 100644 --- a/include/xo/alloc2/arena/ArenaConfig.hpp +++ b/include/xo/alloc2/arena/ArenaConfig.hpp @@ -5,7 +5,7 @@ #pragma once -#include "AllocatorError.hpp" +#include "alloc/AllocatorError.hpp" #include #include diff --git a/include/xo/alloc2/IAllocator_DArena.hpp b/include/xo/alloc2/arena/IAllocator_DArena.hpp similarity index 97% rename from include/xo/alloc2/IAllocator_DArena.hpp rename to include/xo/alloc2/arena/IAllocator_DArena.hpp index 7125b1df..1adbbf49 100644 --- a/include/xo/alloc2/IAllocator_DArena.hpp +++ b/include/xo/alloc2/arena/IAllocator_DArena.hpp @@ -3,8 +3,8 @@ * @author Roland Conybeare, Dec 2025 **/ -#include "AAllocator.hpp" -#include "IAllocator_Xfer.hpp" +#include "alloc/AAllocator.hpp" +#include "alloc/IAllocator_Xfer.hpp" #include "arena/DArena.hpp" namespace xo { diff --git a/src/alloc2/AAllocator.cpp b/src/alloc2/AAllocator.cpp index 0061ef06..e0d90284 100644 --- a/src/alloc2/AAllocator.cpp +++ b/src/alloc2/AAllocator.cpp @@ -1,6 +1,6 @@ /** @file AAllocator.cpp **/ -#include "xo/alloc2/AAllocator.hpp" +#include "alloc/AAllocator.hpp" namespace xo { namespace mm { diff --git a/src/alloc2/DArena.cpp b/src/alloc2/DArena.cpp index 8a54f592..ef4a704f 100644 --- a/src/alloc2/DArena.cpp +++ b/src/alloc2/DArena.cpp @@ -3,7 +3,7 @@ * @author Roland Conybeare, Dec 2025 **/ -#include "xo/alloc2/AAllocator.hpp" +#include "alloc/AAllocator.hpp" #include "arena/DArena.hpp" #include "xo/alloc2/padding.hpp" #include "xo/indentlog/print/tag.hpp" diff --git a/src/alloc2/IAllocator_Any.cpp b/src/alloc2/IAllocator_Any.cpp index 2f92711c..1d12c6cb 100644 --- a/src/alloc2/IAllocator_Any.cpp +++ b/src/alloc2/IAllocator_Any.cpp @@ -3,7 +3,7 @@ * @author Roland Conybeare, Dec 2025 **/ -#include "IAllocator_Any.hpp" +#include "alloc/IAllocator_Any.hpp" #include namespace xo { diff --git a/src/alloc2/IAllocator_DArena.cpp b/src/alloc2/IAllocator_DArena.cpp index b37aab1a..0818a328 100644 --- a/src/alloc2/IAllocator_DArena.cpp +++ b/src/alloc2/IAllocator_DArena.cpp @@ -3,7 +3,7 @@ * @author Roland Conybeare, Dec 2025 **/ -#include "IAllocator_DArena.hpp" +#include "arena/IAllocator_DArena.hpp" #include "padding.hpp" #include "xo/indentlog/scope.hpp" #include diff --git a/utest/arena.test.cpp b/utest/arena.test.cpp index 501724d8..ae4c2dd0 100644 --- a/utest/arena.test.cpp +++ b/utest/arena.test.cpp @@ -5,10 +5,10 @@ #include "xo/alloc2/Allocator.hpp" //#include "xo/alloc2/IAllocator_Any.hpp" -#include "xo/alloc2/IAllocator_Xfer.hpp" +#include "xo/alloc2/alloc/IAllocator_Xfer.hpp" //#include "xo/alloc2/DArena.hpp" -#include "xo/alloc2/IAllocator_DArena.hpp" -#include "xo/alloc2/RAllocator.hpp" +#include "xo/alloc2/arena/IAllocator_DArena.hpp" +//#include "xo/alloc2/alloc/RAllocator.hpp" #include "xo/alloc2/padding.hpp" #include "xo/indentlog/scope.hpp" #include "xo/facet/obj.hpp"