xo-object2: tidy IGCObject_DInteger + codegen
This commit is contained in:
parent
028dea8047
commit
5e6db993ee
10 changed files with 152 additions and 77 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <xo/gc/Collector.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <xo/indentlog/print/ppindentinfo.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
|
|
@ -14,6 +15,7 @@ namespace xo {
|
|||
namespace scm {
|
||||
struct DInteger {
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using value_type = long;
|
||||
|
||||
|
|
@ -32,6 +34,12 @@ namespace xo {
|
|||
|
||||
operator long() const noexcept { return value_; }
|
||||
|
||||
// GCObject facet
|
||||
|
||||
std::size_t shallow_size() const noexcept;
|
||||
DInteger * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
std::size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
private:
|
||||
/** boxed integer value **/
|
||||
long value_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue