xo-gc stack: refactor: introduce GCObjectVisitor facet

Plan using to properly level GCObjectStore and MutationLogStore
below Collector.

[WIP] not used yet
This commit is contained in:
Roland Conybeare 2026-04-05 18:07:14 -04:00
commit df0bbe1b31
9 changed files with 489 additions and 0 deletions

View file

@ -9,7 +9,9 @@ set(SELF_SRCS
CollectorTypeRegistry.cpp
facet/ICollector_Any.cpp
IGCObject_Any.cpp
facet/IGCObjectVisitor_Any.cpp
AAllocator.cpp
IAllocator_Any.cpp

View file

@ -0,0 +1,48 @@
/** @file IGCObjectVisitor_Any.cpp
*
**/
#include "gc/IGCObjectVisitor_Any.hpp"
#include <iostream>
#include <exception>
namespace xo {
namespace mm {
using xo::facet::DVariantPlaceholder;
using xo::facet::typeseq;
using xo::facet::valid_facet_implementation;
void
IGCObjectVisitor_Any::_fatal()
{
/* control here on uninitialized IAllocator_Any.
* Initialized instance will have specific implementation type
*/
std::cerr << "fatal"
<< ": attempt to call uninitialized"
<< " IGCObjectVisitor_Any method"
<< std::endl;
std::terminate();
}
typeseq
IGCObjectVisitor_Any::s_typeseq = typeseq::id<DVariantPlaceholder>();
bool
IGCObjectVisitor_Any::_valid
= valid_facet_implementation<AGCObjectVisitor, IGCObjectVisitor_Any>();
// nonconst methods
auto
IGCObjectVisitor_Any::visit_child(Opaque, AGCObject *, void **) const noexcept -> void
{
_fatal();
}
} /*namespace mm*/
} /*namespace xo*/
/* end IGCObjectVisitor_Any.cpp */