xo-alloc2 xo-object: bugfix + refactor -> IGCObject_DList builds
This commit is contained in:
parent
201d2576ad
commit
6e6305c72f
11 changed files with 278 additions and 17 deletions
47
include/xo/alloc2/RGCObject.hpp
Normal file
47
include/xo/alloc2/RGCObject.hpp
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/** @file RGCObject.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AGCObject.hpp"
|
||||
#include <xo/facet/RRouter.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace mm {
|
||||
/** @class RGCObject **/
|
||||
template <typename Object>
|
||||
struct RGCObject : public Object {
|
||||
private:
|
||||
using O = Object;
|
||||
public:
|
||||
using ObjectType = Object;
|
||||
using DataPtr = Object::DataPtr;
|
||||
using size_type = std::size_t;
|
||||
|
||||
RGCObject() = default;
|
||||
RGCObject(Object::DataPtr data) : Object{std::move(data)} {}
|
||||
|
||||
int32_t _typeseq() const noexcept { return O::iface()->_typeseq(); }
|
||||
size_type shallow_size() const noexcept { O::iface()->shallow_size(O::data()); }
|
||||
Opaque * shallow_copy(obj<AAllocator> mm) const noexcept { O::iface()->shallow_copy(O::data(), mm); }
|
||||
size_type forward_children() noexcept { O::iface()->forward_children(O::data()); }
|
||||
|
||||
static bool _valid;
|
||||
};
|
||||
|
||||
template <typename Object>
|
||||
bool
|
||||
RGCObject<Object>::_valid = facet::valid_object_router<RGCObject>();
|
||||
} /*namespace mm*/
|
||||
|
||||
namespace facet {
|
||||
template <typename Object>
|
||||
struct RoutingFor<xo::mm::AGCObject, Object> {
|
||||
using RoutingType = xo::mm::RGCObject<Object>;
|
||||
};
|
||||
}
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end RGCObject.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue