xo-gc xo-alloc2: move Collector faceet gc/ -> alloc2/ for levelling

This commit is contained in:
Roland Conybeare 2026-03-04 22:26:31 +11:00
commit e33ab0ae98
13 changed files with 791 additions and 1 deletions

View file

@ -0,0 +1,47 @@
/** @file GCObject.hpp
*
* Generated automagically from ingredients:
* 1. code generator:
* [xo-facet/codegen/genfacet]
* arguments:
* --input [idl/GCObject.json5]
* 2. jinja2 template for facet .hpp file:
* [facet.hpp.j2]
* 3. idl for facet methods
* [idl/GCObject.json5]
**/
#pragma once
#include "gc/AGCObject.hpp"
#include "gc/IGCObject_Any.hpp"
#include "gc/IGCObject_Xfer.hpp"
#include "gc/RGCObject.hpp"
namespace xo {
namespace mm {
/** defined here to avoid #include cycle, since
* template obj<AGCObject,DRepr> awkward to make available there
**/
template <typename Object>
template <typename DRepr>
void
RCollector<Object>::forward_inplace(xo::facet::obj<AGCObject,DRepr> * p_obj)
{
this->forward_inplace(p_obj->iface(), (void **)&(p_obj->data_));
}
template <typename Object>
template <typename DRepr>
void
RCollector<Object>::forward_inplace(DRepr ** p_repr)
{
// fetch static interface for DRepr
auto iface = xo::facet::impl_for<AGCObject,DRepr>();
this->forward_inplace(&iface, (void **)p_repr);
}
}
}
/* end GCObject.hpp */