xo-gc: missed files in prev commit
This commit is contained in:
parent
b1155655d5
commit
d0fea5fcf1
2 changed files with 62 additions and 0 deletions
20
include/xo/gc/setup_gc.hpp
Normal file
20
include/xo/gc/setup_gc.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/** @file SetupGc.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Mar 2026
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace xo {
|
||||
namespace mm {
|
||||
|
||||
class SetupGc {
|
||||
public:
|
||||
/** Register gc (facet,impl) combinations with FacetRegistry **/
|
||||
static bool register_facets();
|
||||
};
|
||||
|
||||
} /*namespace mm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end SetupGc.hpp */
|
||||
42
src/gc/setup_gc.cpp
Normal file
42
src/gc/setup_gc.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/** @file setup_gc.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Mar 2026
|
||||
**/
|
||||
|
||||
#include "setup_gc.hpp"
|
||||
#include "X1Collector.hpp"
|
||||
#include "GCObjectStoreVisitor.hpp"
|
||||
#include <xo/facet/FacetRegistry.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
|
||||
namespace xo {
|
||||
using xo::mm::AAllocator;
|
||||
using xo::mm::ACollector;
|
||||
using xo::mm::DX1Collector;
|
||||
using xo::facet::FacetRegistry;
|
||||
using xo::reflect::typeseq;
|
||||
|
||||
namespace mm {
|
||||
|
||||
bool
|
||||
SetupGc::register_facets()
|
||||
{
|
||||
scope log(XO_DEBUG(true));
|
||||
|
||||
FacetRegistry::register_impl<AAllocator, DX1Collector>();
|
||||
FacetRegistry::register_impl<ACollector, DX1Collector>();
|
||||
|
||||
FacetRegistry::register_impl<AGCObjectVisitor, DGCObjectStoreVisitor>();
|
||||
|
||||
log && log(xtag("DX1Collector.tseq", typeseq::id<DX1Collector>()));
|
||||
log && log(xtag("DGCObjectStoreVisitor.tseq", typeseq::id<DGCObjectStoreVisitor>()));
|
||||
|
||||
log && log(xtag("ACollector.tseq", typeseq::id<ACollector>()));
|
||||
log && log(xtag("AGCObjectVisitor.tseq", typeseq::id<AGCObjectVisitor>()));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end setup_gc.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue