From 154eca10868d7d61bf4774cbf0b497e704fca4f7 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 6 Jan 2026 00:01:38 -0500 Subject: [PATCH] xo-arena xo-facet xo-alloc2: build restored --- xo-alloc2/cmake/xo_alloc2Config.cmake.in | 1 + .../xo/alloc2/alloc/AAllocIterator.hpp | 2 +- .../include/xo/alloc2/alloc/AAllocator.hpp | 2 +- .../xo/alloc2/alloc/IAllocIterator_Any.hpp | 2 +- .../xo/alloc2/alloc/IAllocIterator_Xfer.hpp | 6 +++--- .../xo/alloc2/alloc/RAllocIterator.hpp | 2 +- xo-alloc2/src/alloc2/CMakeLists.txt | 3 ++- xo-alloc2/src/alloc2/IAllocIterator_Any.cpp | 2 +- xo-arena/CMakeLists.txt | 14 ++------------ xo-arena/README.md | 1 - xo-arena/cmake/xo_arenaConfig.cmake.in | 2 +- .../include/xo/arena}/AllocError.hpp | 0 .../src/arena}/AllocError.cpp | 0 xo-arena/src/arena/CMakeLists.txt | 19 +++++++++++++++++++ xo-facet/include/xo/facet/OObject.hpp | 3 ++- xo-facet/utest/CMakeLists.txt | 1 + xo-object2/include/xo/object2/DList.hpp | 4 ++++ xo-object2/src/object2/IPrintable_DList.cpp | 8 +++++++- xo-ratio/utest/CMakeLists.txt | 1 + 19 files changed, 48 insertions(+), 25 deletions(-) delete mode 100644 xo-arena/README.md rename {xo-alloc2/include/xo/alloc2 => xo-arena/include/xo/arena}/AllocError.hpp (100%) rename {xo-alloc2/src/alloc2 => xo-arena/src/arena}/AllocError.cpp (100%) create mode 100644 xo-arena/src/arena/CMakeLists.txt diff --git a/xo-alloc2/cmake/xo_alloc2Config.cmake.in b/xo-alloc2/cmake/xo_alloc2Config.cmake.in index 65ab5b1c..e0b5e0b0 100644 --- a/xo-alloc2/cmake/xo_alloc2Config.cmake.in +++ b/xo-alloc2/cmake/xo_alloc2Config.cmake.in @@ -2,6 +2,7 @@ include(CMakeFindDependencyMacro) #find_dependency(indentlog) +find_depnedency(xo_arena) find_dependency(xo_facet) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") check_required_components("@PROJECT_NAME@") diff --git a/xo-alloc2/include/xo/alloc2/alloc/AAllocIterator.hpp b/xo-alloc2/include/xo/alloc2/alloc/AAllocIterator.hpp index 4b9f4ab9..e7581dc4 100644 --- a/xo-alloc2/include/xo/alloc2/alloc/AAllocIterator.hpp +++ b/xo-alloc2/include/xo/alloc2/alloc/AAllocIterator.hpp @@ -23,7 +23,7 @@ namespace xo { **/ struct AAllocIterator { using obj_AAllocIterator = xo::facet::obj; - using typeseq = xo::facet::typeseq; + using typeseq = xo::reflect::typeseq; /** @defgroup mm-allociterator-methods AllocIterator methods **/ ///@{ diff --git a/xo-alloc2/include/xo/alloc2/alloc/AAllocator.hpp b/xo-alloc2/include/xo/alloc2/alloc/AAllocator.hpp index 0fce475c..588b439b 100644 --- a/xo-alloc2/include/xo/alloc2/alloc/AAllocator.hpp +++ b/xo-alloc2/include/xo/alloc2/alloc/AAllocator.hpp @@ -5,7 +5,7 @@ #pragma once -#include "AllocError.hpp" +#include #include "AllocInfo.hpp" //#include "AllocIterator.hpp" #include "AllocRange.hpp" diff --git a/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Any.hpp b/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Any.hpp index f946c397..1bed0ff1 100644 --- a/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Any.hpp +++ b/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Any.hpp @@ -20,7 +20,7 @@ namespace xo { * @brief AllocIterator implementation for empty variant instance **/ struct IAllocIterator_Any : public AAllocIterator { - using typeseq = xo::facet::typeseq; + using typeseq = xo::reflect::typeseq; const AAllocIterator * iface() const { return std::launder(this); } diff --git a/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Xfer.hpp b/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Xfer.hpp index e61e326c..251f4afd 100644 --- a/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Xfer.hpp +++ b/xo-alloc2/include/xo/alloc2/alloc/IAllocIterator_Xfer.hpp @@ -18,7 +18,7 @@ namespace xo { typename IAllocIterator_DRepr> struct IAllocIterator_Xfer : public AAllocIterator { using Impl = IAllocIterator_DRepr; - using typeseq = xo::facet::typeseq; + using typeseq = xo::reflect::typeseq; static const DRepr & _dcast(Copaque d) { return *(const DRepr *)d; } static DRepr & _dcast(Opaque d) { return *(DRepr *)d; } @@ -48,9 +48,9 @@ namespace xo { }; template - xo::facet::typeseq + xo::reflect::typeseq IAllocIterator_Xfer::s_typeseq - = facet::typeseq::id(); + = reflect::typeseq::id(); template bool diff --git a/xo-alloc2/include/xo/alloc2/alloc/RAllocIterator.hpp b/xo-alloc2/include/xo/alloc2/alloc/RAllocIterator.hpp index 4e1a95f8..47d59f29 100644 --- a/xo-alloc2/include/xo/alloc2/alloc/RAllocIterator.hpp +++ b/xo-alloc2/include/xo/alloc2/alloc/RAllocIterator.hpp @@ -17,7 +17,7 @@ namespace xo { public: using ObjectType = Object; using DataPtr = Object::DataPtr; - using typeseq = xo::facet::typeseq; + using typeseq = xo::reflect::typeseq; RAllocIterator() {} RAllocIterator(Object::DataPtr data) : Object{std::move(data)} {} diff --git a/xo-alloc2/src/alloc2/CMakeLists.txt b/xo-alloc2/src/alloc2/CMakeLists.txt index 1d66ead5..a93f7db0 100644 --- a/xo-alloc2/src/alloc2/CMakeLists.txt +++ b/xo-alloc2/src/alloc2/CMakeLists.txt @@ -3,7 +3,7 @@ set(SELF_LIB xo_alloc2) set(SELF_SRCS - AllocError.cpp +# AllocError.cpp AllocInfo.cpp cmpresult.cpp @@ -21,5 +21,6 @@ set(SELF_SRCS xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS}) # note: deps here must also appear in cmake/xo_alloc2Config.cmake.in +xo_dependency(${SELF_LIB} xo_arena) xo_dependency(${SELF_LIB} xo_facet) xo_dependency(${SELF_LIB} indentlog) diff --git a/xo-alloc2/src/alloc2/IAllocIterator_Any.cpp b/xo-alloc2/src/alloc2/IAllocIterator_Any.cpp index befaea8c..86c2ba72 100644 --- a/xo-alloc2/src/alloc2/IAllocIterator_Any.cpp +++ b/xo-alloc2/src/alloc2/IAllocIterator_Any.cpp @@ -9,8 +9,8 @@ namespace xo { namespace mm { using xo::facet::DVariantPlaceholder; - using xo::facet::typeseq; using xo::facet::valid_facet_implementation; + using xo::reflect::typeseq; void IAllocIterator_Any::_fatal() { diff --git a/xo-arena/CMakeLists.txt b/xo-arena/CMakeLists.txt index 70e8d6d9..24d544ec 100644 --- a/xo-arena/CMakeLists.txt +++ b/xo-arena/CMakeLists.txt @@ -20,22 +20,12 @@ add_definitions(${PROJECT_CXX_FLAGS}) # ---------------------------------------------------------------- # output targets +add_subdirectory(src/arena) #add_subdirectory(utest) # ---------------------------------------------------------------- -# header-only library +# cmake export -set(SELF_LIB xo_arena) -xo_add_headeronly_library(${SELF_LIB}) -xo_install_library4(${SELF_LIB} ${PROJECT_NAME}Targets) xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets) -# ---------------------------------------------------------------- -# input dependencies -# -# NOTE: dependency set here must be kept consistent with -# xo-arena/cmake/xo_arenaConfig.cmake.in - -#xo_headeronly_dependency(${SELF_LIB} xo_flatstring) - # end CMakeLists.txt diff --git a/xo-arena/README.md b/xo-arena/README.md deleted file mode 100644 index 6c14c75c..00000000 --- a/xo-arena/README.md +++ /dev/null @@ -1 +0,0 @@ -# xo-arena diff --git a/xo-arena/cmake/xo_arenaConfig.cmake.in b/xo-arena/cmake/xo_arenaConfig.cmake.in index b5c3cd5c..3b32fb0e 100644 --- a/xo-arena/cmake/xo_arenaConfig.cmake.in +++ b/xo-arena/cmake/xo_arenaConfig.cmake.in @@ -6,7 +6,7 @@ include(CMakeFindDependencyMacro) # must coordinate with xo_dependency() calls # in CMakeLists.txt # -#find_dependency(xo_flatstring) +find_dependency(xo_reflectutil) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") check_required_components("@PROJECT_NAME@") diff --git a/xo-alloc2/include/xo/alloc2/AllocError.hpp b/xo-arena/include/xo/arena/AllocError.hpp similarity index 100% rename from xo-alloc2/include/xo/alloc2/AllocError.hpp rename to xo-arena/include/xo/arena/AllocError.hpp diff --git a/xo-alloc2/src/alloc2/AllocError.cpp b/xo-arena/src/arena/AllocError.cpp similarity index 100% rename from xo-alloc2/src/alloc2/AllocError.cpp rename to xo-arena/src/arena/AllocError.cpp diff --git a/xo-arena/src/arena/CMakeLists.txt b/xo-arena/src/arena/CMakeLists.txt new file mode 100644 index 00000000..bc969b7f --- /dev/null +++ b/xo-arena/src/arena/CMakeLists.txt @@ -0,0 +1,19 @@ +# xo-arena/src/CMakeLists.txt + +set(SELF_LIB xo_arena) +set(SELF_SRCS + AllocError.cpp +) + +xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS}) +xo_install_include_tree3(include/xo/arena) + +# ---------------------------------------------------------------- +# input dependencies +# +# NOTE: dependency set here must be kept consistent with +# xo-arena/cmake/xo_arenaConfig.cmake.in + +xo_dependency(${SELF_LIB} xo_reflectutil) + +# end src/CMakeLists.txt diff --git a/xo-facet/include/xo/facet/OObject.hpp b/xo-facet/include/xo/facet/OObject.hpp index 93b532d7..37298fef 100644 --- a/xo-facet/include/xo/facet/OObject.hpp +++ b/xo-facet/include/xo/facet/OObject.hpp @@ -6,7 +6,7 @@ #pragma once #include "facet_implementation.hpp" -#include "typeseq.hpp" +#include #include #include #include @@ -64,6 +64,7 @@ namespace xo { using DataType = DRepr; using DataPtr = DRepr*; using Opaque = void *; + using typeseq = xo::reflect::typeseq; /* required for vtable swapping to work */ //static_assert(std::is_trivially_copyable_v); diff --git a/xo-facet/utest/CMakeLists.txt b/xo-facet/utest/CMakeLists.txt index 81ec6d99..eec41c06 100644 --- a/xo-facet/utest/CMakeLists.txt +++ b/xo-facet/utest/CMakeLists.txt @@ -8,6 +8,7 @@ set(UTEST_SRCS if (ENABLE_TESTING) xo_add_utest_executable(${UTEST_EXE} ${UTEST_SRCS}) + xo_self_dependency(${UTEST_EXE} xo_arena) xo_external_target_dependency(${UTEST_EXE} Catch2 Catch2::Catch2) endif() diff --git a/xo-object2/include/xo/object2/DList.hpp b/xo-object2/include/xo/object2/DList.hpp index f6296933..6f803a82 100644 --- a/xo-object2/include/xo/object2/DList.hpp +++ b/xo-object2/include/xo/object2/DList.hpp @@ -8,6 +8,7 @@ #include //#include "xo/alloc2/gcobject/RGCObject.hpp" #include +#include namespace xo { namespace scm { @@ -16,6 +17,7 @@ namespace xo { using size_type = std::size_t; using AGCObject = xo::mm::AGCObject; using AAllocator = xo::mm::AAllocator; + using ppindentinfo = xo::print::ppindentinfo; DList(xo::obj h, DList * r) : head_{h}, rest_{r} {} @@ -40,8 +42,10 @@ namespace xo { /** return element at 0-based index @p ix **/ obj at(size_type ix) const; +#ifdef NOT_YET /** pretty-printing driver; combine layout+printing **/ bool pretty(const ppindentinfo & ppii) const; +#endif /** first member of list **/ obj head_; diff --git a/xo-object2/src/object2/IPrintable_DList.cpp b/xo-object2/src/object2/IPrintable_DList.cpp index 880af691..b705ad59 100644 --- a/xo-object2/src/object2/IPrintable_DList.cpp +++ b/xo-object2/src/object2/IPrintable_DList.cpp @@ -18,11 +18,17 @@ namespace xo { auto IPrintable_DList::pretty(const DList & self, const ppindentinfo & ppii) -> bool { + (void)self; + (void)ppii; + + return false; +#ifdef NOT_YET return self.pretty(ppii); +#endif } } /*namespace scm*/ } /*namespace xo*/ -/* end IPrintable_DList.cpp */ \ No newline at end of file +/* end IPrintable_DList.cpp */ diff --git a/xo-ratio/utest/CMakeLists.txt b/xo-ratio/utest/CMakeLists.txt index f1ebac58..81379c30 100644 --- a/xo-ratio/utest/CMakeLists.txt +++ b/xo-ratio/utest/CMakeLists.txt @@ -20,6 +20,7 @@ if (ENABLE_TESTING) xo_headeronly_dependency(${SELF_EXE} xo_reflectutil) xo_dependency(${SELF_EXE} randomgen) xo_dependency(${SELF_EXE} indentlog) + xo_dependency(${SELF_EXE} xo_flatstring) xo_external_target_dependency(${SELF_EXE} Catch2 Catch2::Catch2) endif()