xo-gc xo-alloc2: move Collector faceet gc/ -> alloc2/ for levelling
This commit is contained in:
parent
1cca7980c9
commit
e33ab0ae98
13 changed files with 791 additions and 1 deletions
47
include/xo/alloc2/GCObject.hpp
Normal file
47
include/xo/alloc2/GCObject.hpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue