+ xo-alloc + xo-object + xo-alloc docs + GC utests
This commit is contained in:
parent
03c8d66401
commit
e1d5ae46d2
58 changed files with 3948 additions and 83 deletions
38
xo-object/src/object/Integer.cpp
Normal file
38
xo-object/src/object/Integer.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* @file Integer.cpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2025
|
||||
*/
|
||||
|
||||
#include "Integer.hpp"
|
||||
#include <cstddef>
|
||||
|
||||
namespace xo {
|
||||
namespace obj {
|
||||
Integer::Integer(int_type x) : value_{x} {}
|
||||
|
||||
gp<Integer>
|
||||
Integer::make(int_type x) {
|
||||
return new (MMPtr(mm)) Integer(x);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
Integer::_shallow_size() const {
|
||||
return sizeof(Integer);
|
||||
}
|
||||
|
||||
Object *
|
||||
Integer::_shallow_copy() const {
|
||||
Cpof cpof(this);
|
||||
|
||||
return new (cpof) Integer(*this);
|
||||
}
|
||||
|
||||
std::size_t
|
||||
Integer::_forward_children() {
|
||||
return Integer::_shallow_size();
|
||||
}
|
||||
|
||||
} /*namespace obj*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end Integer.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue