xo-expression2: AGCObject support for DVariable
This commit is contained in:
parent
2a7d6d24a8
commit
a26b781101
8 changed files with 176 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ namespace xo {
|
|||
class DVariable {
|
||||
public:
|
||||
using ppindentinfo = xo::print::ppindentinfo;
|
||||
using ACollector = xo::mm::ACollector;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using TypeDescr = xo::reflect::TypeDescr;
|
||||
|
||||
|
|
@ -56,6 +57,14 @@ namespace xo {
|
|||
TypeDescr valuetype() const noexcept { return typeref_.td(); };
|
||||
void assign_valuetype(TypeDescr td) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-variable-gcobject-facet **/
|
||||
///@{
|
||||
|
||||
size_t shallow_size() const noexcept;
|
||||
DVariable * shallow_copy(obj<AAllocator> mm) const noexcept;
|
||||
size_t forward_children(obj<ACollector> gc) noexcept;
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-variable-printable-facet **/
|
||||
///@{
|
||||
|
|
|
|||
67
include/xo/expression2/detail/IGCObject_DVariable.hpp
Normal file
67
include/xo/expression2/detail/IGCObject_DVariable.hpp
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/** @file IGCObject_DVariable.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DVariable.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IGCObject_DVariable.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "GCObject.hpp"
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include "DVariable.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IGCObject_DVariable; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::mm::AGCObject,
|
||||
xo::scm::DVariable>
|
||||
{
|
||||
using ImplType = xo::mm::IGCObject_Xfer
|
||||
<xo::scm::DVariable,
|
||||
xo::scm::IGCObject_DVariable>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IGCObject_DVariable
|
||||
**/
|
||||
class IGCObject_DVariable {
|
||||
public:
|
||||
/** @defgroup scm-gcobject-dvariable-type-traits **/
|
||||
///@{
|
||||
using size_type = xo::mm::AGCObject::size_type;
|
||||
using AAllocator = xo::mm::AGCObject::AAllocator;
|
||||
using ACollector = xo::mm::AGCObject::ACollector;
|
||||
using Copaque = xo::mm::AGCObject::Copaque;
|
||||
using Opaque = xo::mm::AGCObject::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-gcobject-dvariable-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** memory consumption for this instance **/
|
||||
static size_type shallow_size(const DVariable & self) noexcept;
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(const DVariable & self, obj<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DVariable & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
Loading…
Add table
Add a link
Reference in a new issue