xo-procedure2: + DPrimitive_gco_0 (primitive with 0 arguments)
This commit is contained in:
parent
c99ac53c72
commit
bb20725940
15 changed files with 429 additions and 0 deletions
|
|
@ -46,6 +46,35 @@ xo_add_genfacetimpl(
|
|||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
# note: manual target; generated code committed to git
|
||||
xo_add_genfacetimpl(
|
||||
TARGET xo-procedure2-facetimpl-procedure-primitive_gco_0
|
||||
FACET_PKG xo_procedure2
|
||||
FACET Procedure
|
||||
REPR DPrimitive_gco_0
|
||||
INPUT idl/IProcedure_DPrimitive_gco_0.json5
|
||||
)
|
||||
|
||||
# note: manual target; generated code committed to git
|
||||
xo_add_genfacetimpl(
|
||||
TARGET xo-procedure2-facetimpl-gcobject-primitive_gco_0
|
||||
FACET_PKG xo_gc
|
||||
FACET GCObject
|
||||
REPR Primitive_gco_0
|
||||
INPUT idl/IGCObject_DPrimitive_gco_0.json5
|
||||
)
|
||||
|
||||
# note: manual target; generated code committed to git
|
||||
xo_add_genfacetimpl(
|
||||
TARGET xo-procedure2-facetimpl-printable-primitive_gco_0
|
||||
FACET_PKG xo_printable2
|
||||
FACET Printable
|
||||
REPR Primitive_gco_0
|
||||
INPUT idl/IPrintable_DPrimitive_gco_0.json5
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
# note: manual target; generated code committed to git
|
||||
xo_add_genfacetimpl(
|
||||
TARGET xo-procedure2-facetimpl-procedure-primitive_gco_2_gco_gco
|
||||
|
|
|
|||
19
idl/IGCObject_DPrimitive_gco_0.json5
Normal file
19
idl/IGCObject_DPrimitive_gco_0.json5
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
mode: "implementation",
|
||||
output_cpp_dir: "src/procedure2",
|
||||
output_hpp_dir: "include/xo/procedure2",
|
||||
output_impl_subdir: "detail",
|
||||
includes: [
|
||||
//<xo/procedure2/GCObjectConversion_DPrimitive_gco_0.hpp>
|
||||
"<xo/gc/GCObject.hpp>",
|
||||
"<xo/alloc2/Allocator.hpp>",
|
||||
],
|
||||
local_types: [ ],
|
||||
namespace1: "xo",
|
||||
namespace2: "scm",
|
||||
facet_idl: "idl/GCObject.json5",
|
||||
brief: "provide AGCobject interface for Primitive _ -> gco",
|
||||
using_doxygen: true,
|
||||
repr: "DPrimitive_gco_0",
|
||||
doc: [ "implement AGCObject for DPrimitive _ -> gco" ],
|
||||
}
|
||||
18
idl/IPrintable_DPrimitive_gco_0.json5
Normal file
18
idl/IPrintable_DPrimitive_gco_0.json5
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
mode: "implementation",
|
||||
output_cpp_dir: "src/procedure2",
|
||||
output_hpp_dir: "include/xo/procedure2",
|
||||
output_impl_subdir: "detail",
|
||||
includes: [
|
||||
"<xo/printable2/Printable.hpp>",
|
||||
"<xo/printable2/detail/IPrintable_Xfer.hpp>",
|
||||
],
|
||||
local_types: [ ],
|
||||
namespace1: "xo",
|
||||
namespace2: "scm",
|
||||
facet_idl: "idl/Printable.json5",
|
||||
brief: "provide APrintable interface for DPrimitive _ -> gco",
|
||||
using_doxygen: true,
|
||||
repr: "DPrimitive_gco_0",
|
||||
doc: [ "implement APrintable for DPrimitive _ -> gco" ],
|
||||
}
|
||||
20
idl/IProcedure_DPrimitive_gco_0.json5
Normal file
20
idl/IProcedure_DPrimitive_gco_0.json5
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
mode: "implementation",
|
||||
output_cpp_dir: "src/procedure2",
|
||||
output_hpp_dir: "include/xo/procedure2",
|
||||
output_impl_subdir: "detail",
|
||||
includes: [
|
||||
"<xo/procedure2/RuntimeContext.hpp>",
|
||||
"<xo/procedure2/detail/IRuntimeContext_Xfer.hpp>",
|
||||
"<xo/procedure2/Procedure.hpp>",
|
||||
"<xo/procedure2/detail/IProcedure_Xfer.hpp>",
|
||||
],
|
||||
local_types: [ ],
|
||||
namespace1: "xo",
|
||||
namespace2: "scm",
|
||||
facet_idl: "idl/Procedure.json5",
|
||||
brief: "provide AProcedure interface for Primitive _ -> gco",
|
||||
using_doxygen: true,
|
||||
repr: "DPrimitive_gco_0",
|
||||
doc: [ "implement AProcedure for DPrimitive _ -> gco" ],
|
||||
}
|
||||
20
include/xo/procedure2/DPrimitive_gco_0.hpp
Normal file
20
include/xo/procedure2/DPrimitive_gco_0.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/** @file DPrimitive_gco_0.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Jan 2026
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include "DPrimitive.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
using xo::mm::AGCObject;
|
||||
using xo::facet::obj;
|
||||
|
||||
using DPrimitive_gco_0 = Primitive<obj<AGCObject> (*)(obj<ARuntimeContext>)>;
|
||||
}
|
||||
}
|
||||
|
||||
/* end DPrimitive_gco_0.hpp */
|
||||
11
include/xo/procedure2/Primitive_gco_0.hpp
Normal file
11
include/xo/procedure2/Primitive_gco_0.hpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/** @file Primitive_gco_0_gco_gco.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2026
|
||||
**/
|
||||
|
||||
#include "DPrimitive_gco_0.hpp"
|
||||
#include "detail/IProcedure_DPrimitive_gco_0.hpp"
|
||||
#include "detail/IGCObject_DPrimitive_gco_0.hpp"
|
||||
#include "detail/IPrintable_DPrimitive_gco_0.hpp"
|
||||
|
||||
/* end Primitive_gco_2_gco_gco.hpp */
|
||||
67
include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp
Normal file
67
include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/** @file IGCObject_DPrimitive_gco_0.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DPrimitive_gco_0.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IGCObject_DPrimitive_gco_0.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "GCObject.hpp"
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include "DPrimitive_gco_0.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IGCObject_DPrimitive_gco_0; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::mm::AGCObject,
|
||||
xo::scm::DPrimitive_gco_0>
|
||||
{
|
||||
using ImplType = xo::mm::IGCObject_Xfer
|
||||
<xo::scm::DPrimitive_gco_0,
|
||||
xo::scm::IGCObject_DPrimitive_gco_0>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IGCObject_DPrimitive_gco_0
|
||||
**/
|
||||
class IGCObject_DPrimitive_gco_0 {
|
||||
public:
|
||||
/** @defgroup scm-gcobject-dprimitive_gco_0-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-dprimitive_gco_0-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** memory consumption for this instance **/
|
||||
static size_type shallow_size(const DPrimitive_gco_0 & self) noexcept;
|
||||
/** copy instance using allocator **/
|
||||
static Opaque shallow_copy(const DPrimitive_gco_0 & self, obj<AAllocator> mm) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** during GC: forward immdiate children **/
|
||||
static size_type forward_children(DPrimitive_gco_0 & self, obj<ACollector> gc) noexcept;
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
62
include/xo/procedure2/detail/IPrintable_DPrimitive_gco_0.hpp
Normal file
62
include/xo/procedure2/detail/IPrintable_DPrimitive_gco_0.hpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/** @file IPrintable_DPrimitive_gco_0.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DPrimitive_gco_0.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DPrimitive_gco_0.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Printable.hpp"
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
|
||||
#include "DPrimitive_gco_0.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IPrintable_DPrimitive_gco_0; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::print::APrintable,
|
||||
xo::scm::DPrimitive_gco_0>
|
||||
{
|
||||
using ImplType = xo::print::IPrintable_Xfer
|
||||
<xo::scm::DPrimitive_gco_0,
|
||||
xo::scm::IPrintable_DPrimitive_gco_0>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IPrintable_DPrimitive_gco_0
|
||||
**/
|
||||
class IPrintable_DPrimitive_gco_0 {
|
||||
public:
|
||||
/** @defgroup scm-printable-dprimitive_gco_0-type-traits **/
|
||||
///@{
|
||||
using ppindentinfo = xo::print::APrintable::ppindentinfo;
|
||||
using Copaque = xo::print::APrintable::Copaque;
|
||||
using Opaque = xo::print::APrintable::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-printable-dprimitive_gco_0-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** Pretty-printing support for this object.
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
|
||||
static bool pretty(const DPrimitive_gco_0 & self, const ppindentinfo & ppii);
|
||||
|
||||
// non-const methods
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
67
include/xo/procedure2/detail/IProcedure_DPrimitive_gco_0.hpp
Normal file
67
include/xo/procedure2/detail/IProcedure_DPrimitive_gco_0.hpp
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/** @file IProcedure_DPrimitive_gco_0.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IProcedure_DPrimitive_gco_0.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IProcedure_DPrimitive_gco_0.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Procedure.hpp"
|
||||
#include <xo/procedure2/RuntimeContext.hpp>
|
||||
#include <xo/procedure2/detail/IRuntimeContext_Xfer.hpp>
|
||||
#include <xo/procedure2/Procedure.hpp>
|
||||
#include <xo/procedure2/detail/IProcedure_Xfer.hpp>
|
||||
#include "DPrimitive_gco_0.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IProcedure_DPrimitive_gco_0; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::scm::AProcedure,
|
||||
xo::scm::DPrimitive_gco_0>
|
||||
{
|
||||
using ImplType = xo::scm::IProcedure_Xfer
|
||||
<xo::scm::DPrimitive_gco_0,
|
||||
xo::scm::IProcedure_DPrimitive_gco_0>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IProcedure_DPrimitive_gco_0
|
||||
**/
|
||||
class IProcedure_DPrimitive_gco_0 {
|
||||
public:
|
||||
/** @defgroup scm-procedure-dprimitive_gco_0-type-traits **/
|
||||
///@{
|
||||
using AGCObject = xo::scm::AProcedure::AGCObject;
|
||||
using Copaque = xo::scm::AProcedure::Copaque;
|
||||
using Opaque = xo::scm::AProcedure::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-procedure-dprimitive_gco_0-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** true iff procedure takes n arguments **/
|
||||
static bool is_nary(const DPrimitive_gco_0 & self) noexcept;
|
||||
/** number of arguments. -1 for n-ary **/
|
||||
static std::int32_t n_args(const DPrimitive_gco_0 & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** invoke procedure; assume arguments satisfy type system **/
|
||||
static obj<AGCObject> apply_nocheck(DPrimitive_gco_0 & self, obj<ARuntimeContext> rcx, const DArray * args);
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
|
|
@ -11,6 +11,9 @@ set(SELF_SRCS
|
|||
IRuntimeContext_DSimpleRcx.cpp
|
||||
IProcedure_Any.cpp
|
||||
DPrimitive.cpp
|
||||
IGCObject_DPrimitive_gco_0.cpp
|
||||
IProcedure_DPrimitive_gco_0.cpp
|
||||
IPrintable_DPrimitive_gco_0.cpp
|
||||
IGCObject_DPrimitive_gco_2_gco_gco.cpp
|
||||
IProcedure_DPrimitive_gco_2_gco_gco.cpp
|
||||
IPrintable_DPrimitive_gco_2_gco_gco.cpp
|
||||
|
|
|
|||
39
src/procedure2/IGCObject_DPrimitive_gco_0.cpp
Normal file
39
src/procedure2/IGCObject_DPrimitive_gco_0.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/** @file IGCObject_DPrimitive_gco_0.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DPrimitive_gco_0.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IGCObject_DPrimitive_gco_0.json5]
|
||||
**/
|
||||
|
||||
#include "detail/IGCObject_DPrimitive_gco_0.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IGCObject_DPrimitive_gco_0::shallow_size(const DPrimitive_gco_0 & self) noexcept -> size_type
|
||||
{
|
||||
return self.shallow_size();
|
||||
}
|
||||
|
||||
auto
|
||||
IGCObject_DPrimitive_gco_0::shallow_copy(const DPrimitive_gco_0 & self, obj<AAllocator> mm) noexcept -> Opaque
|
||||
{
|
||||
return self.shallow_copy(mm);
|
||||
}
|
||||
|
||||
auto
|
||||
IGCObject_DPrimitive_gco_0::forward_children(DPrimitive_gco_0 & self, obj<ACollector> gc) noexcept -> size_type
|
||||
{
|
||||
return self.forward_children(gc);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IGCObject_DPrimitive_gco_0.cpp */
|
||||
28
src/procedure2/IPrintable_DPrimitive_gco_0.cpp
Normal file
28
src/procedure2/IPrintable_DPrimitive_gco_0.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file IPrintable_DPrimitive_gco_0.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DPrimitive_gco_0.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DPrimitive_gco_0.json5]
|
||||
**/
|
||||
|
||||
#include "detail/IPrintable_DPrimitive_gco_0.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IPrintable_DPrimitive_gco_0::pretty(const DPrimitive_gco_0 & self, const ppindentinfo & ppii) -> bool
|
||||
{
|
||||
return self.pretty(ppii);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DPrimitive_gco_0.cpp */
|
||||
39
src/procedure2/IProcedure_DPrimitive_gco_0.cpp
Normal file
39
src/procedure2/IProcedure_DPrimitive_gco_0.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/** @file IProcedure_DPrimitive_gco_0.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IProcedure_DPrimitive_gco_0.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IProcedure_DPrimitive_gco_0.json5]
|
||||
**/
|
||||
|
||||
#include "detail/IProcedure_DPrimitive_gco_0.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IProcedure_DPrimitive_gco_0::is_nary(const DPrimitive_gco_0 & self) noexcept -> bool
|
||||
{
|
||||
return self.is_nary();
|
||||
}
|
||||
|
||||
auto
|
||||
IProcedure_DPrimitive_gco_0::n_args(const DPrimitive_gco_0 & self) noexcept -> std::int32_t
|
||||
{
|
||||
return self.n_args();
|
||||
}
|
||||
|
||||
auto
|
||||
IProcedure_DPrimitive_gco_0::apply_nocheck(DPrimitive_gco_0 & self, obj<ARuntimeContext> rcx, const DArray * args) -> obj<AGCObject>
|
||||
{
|
||||
return self.apply_nocheck(rcx, args);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IProcedure_DPrimitive_gco_0.cpp */
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "Procedure.hpp"
|
||||
#include "SimpleRcx.hpp"
|
||||
#include "Primitive_gco_0.hpp"
|
||||
#include "Primitive_gco_2_gco_gco.hpp"
|
||||
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
|
|
@ -25,6 +26,10 @@ namespace xo {
|
|||
|
||||
FacetRegistry::register_impl<ARuntimeContext, DSimpleRcx>();
|
||||
|
||||
FacetRegistry::register_impl<AProcedure, DPrimitive_gco_0>();
|
||||
FacetRegistry::register_impl<AGCObject, DPrimitive_gco_0>();
|
||||
FacetRegistry::register_impl<APrintable, DPrimitive_gco_0>();
|
||||
|
||||
FacetRegistry::register_impl<AProcedure, DPrimitive_gco_2_gco_gco>();
|
||||
FacetRegistry::register_impl<AGCObject, DPrimitive_gco_2_gco_gco>();
|
||||
FacetRegistry::register_impl<APrintable, DPrimitive_gco_2_gco_gco>();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "procedure2_register_types.hpp"
|
||||
|
||||
#include "detail/IGCObject_DPrimitive_gco_0.hpp"
|
||||
#include "detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp"
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
|
||||
|
|
@ -25,6 +26,7 @@ namespace xo {
|
|||
|
||||
// (note: don't currently intend to support AGCObject for DSimpleRcx)
|
||||
|
||||
ok &= gc.install_type(impl_for<AGCObject, DPrimitive_gco_0>());
|
||||
ok &= gc.install_type(impl_for<AGCObject, DPrimitive_gco_2_gco_gco>());
|
||||
|
||||
return ok;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue