diff --git a/CMakeLists.txt b/CMakeLists.txt index ac63701..b4cc8fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/idl/IGCObject_DPrimitive_gco_0.json5 b/idl/IGCObject_DPrimitive_gco_0.json5 new file mode 100644 index 0000000..27557c2 --- /dev/null +++ b/idl/IGCObject_DPrimitive_gco_0.json5 @@ -0,0 +1,19 @@ +{ + mode: "implementation", + output_cpp_dir: "src/procedure2", + output_hpp_dir: "include/xo/procedure2", + output_impl_subdir: "detail", + includes: [ + // + "", + "", + ], + 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" ], +} diff --git a/idl/IPrintable_DPrimitive_gco_0.json5 b/idl/IPrintable_DPrimitive_gco_0.json5 new file mode 100644 index 0000000..830078c --- /dev/null +++ b/idl/IPrintable_DPrimitive_gco_0.json5 @@ -0,0 +1,18 @@ +{ + mode: "implementation", + output_cpp_dir: "src/procedure2", + output_hpp_dir: "include/xo/procedure2", + output_impl_subdir: "detail", + includes: [ + "", + "", + ], + 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" ], +} diff --git a/idl/IProcedure_DPrimitive_gco_0.json5 b/idl/IProcedure_DPrimitive_gco_0.json5 new file mode 100644 index 0000000..757e5f5 --- /dev/null +++ b/idl/IProcedure_DPrimitive_gco_0.json5 @@ -0,0 +1,20 @@ +{ + mode: "implementation", + output_cpp_dir: "src/procedure2", + output_hpp_dir: "include/xo/procedure2", + output_impl_subdir: "detail", + includes: [ + "", + "", + "", + "", + ], + 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" ], +} diff --git a/include/xo/procedure2/DPrimitive_gco_0.hpp b/include/xo/procedure2/DPrimitive_gco_0.hpp new file mode 100644 index 0000000..7e5633c --- /dev/null +++ b/include/xo/procedure2/DPrimitive_gco_0.hpp @@ -0,0 +1,20 @@ +/** @file DPrimitive_gco_0.hpp + * + * @author Roland Conybeare, Jan 2026 + **/ + +#pragma once + +#include +#include "DPrimitive.hpp" + +namespace xo { + namespace scm { + using xo::mm::AGCObject; + using xo::facet::obj; + + using DPrimitive_gco_0 = Primitive (*)(obj)>; + } +} + +/* end DPrimitive_gco_0.hpp */ diff --git a/include/xo/procedure2/Primitive_gco_0.hpp b/include/xo/procedure2/Primitive_gco_0.hpp new file mode 100644 index 0000000..00b2d86 --- /dev/null +++ b/include/xo/procedure2/Primitive_gco_0.hpp @@ -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 */ diff --git a/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp new file mode 100644 index 0000000..91ff183 --- /dev/null +++ b/include/xo/procedure2/detail/IGCObject_DPrimitive_gco_0.hpp @@ -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 +#include +#include "DPrimitive_gco_0.hpp" + +namespace xo { namespace scm { class IGCObject_DPrimitive_gco_0; } } + +namespace xo { + namespace facet { + template <> + struct FacetImplementation + { + using ImplType = xo::mm::IGCObject_Xfer + ; + }; + } +} + +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 mm) noexcept; + + // non-const methods + /** during GC: forward immdiate children **/ + static size_type forward_children(DPrimitive_gco_0 & self, obj gc) noexcept; + ///@} + }; + + } /*namespace scm*/ +} /*namespace xo*/ + +/* end */ \ No newline at end of file diff --git a/include/xo/procedure2/detail/IPrintable_DPrimitive_gco_0.hpp b/include/xo/procedure2/detail/IPrintable_DPrimitive_gco_0.hpp new file mode 100644 index 0000000..d8b3012 --- /dev/null +++ b/include/xo/procedure2/detail/IPrintable_DPrimitive_gco_0.hpp @@ -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 +#include +#include "DPrimitive_gco_0.hpp" + +namespace xo { namespace scm { class IPrintable_DPrimitive_gco_0; } } + +namespace xo { + namespace facet { + template <> + struct FacetImplementation + { + using ImplType = xo::print::IPrintable_Xfer + ; + }; + } +} + +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 */ \ No newline at end of file diff --git a/include/xo/procedure2/detail/IProcedure_DPrimitive_gco_0.hpp b/include/xo/procedure2/detail/IProcedure_DPrimitive_gco_0.hpp new file mode 100644 index 0000000..cd1a9b3 --- /dev/null +++ b/include/xo/procedure2/detail/IProcedure_DPrimitive_gco_0.hpp @@ -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 +#include +#include +#include +#include "DPrimitive_gco_0.hpp" + +namespace xo { namespace scm { class IProcedure_DPrimitive_gco_0; } } + +namespace xo { + namespace facet { + template <> + struct FacetImplementation + { + using ImplType = xo::scm::IProcedure_Xfer + ; + }; + } +} + +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 apply_nocheck(DPrimitive_gco_0 & self, obj rcx, const DArray * args); + ///@} + }; + + } /*namespace scm*/ +} /*namespace xo*/ + +/* end */ \ No newline at end of file diff --git a/src/procedure2/CMakeLists.txt b/src/procedure2/CMakeLists.txt index 45f41bd..44a4fad 100644 --- a/src/procedure2/CMakeLists.txt +++ b/src/procedure2/CMakeLists.txt @@ -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 diff --git a/src/procedure2/IGCObject_DPrimitive_gco_0.cpp b/src/procedure2/IGCObject_DPrimitive_gco_0.cpp new file mode 100644 index 0000000..1864246 --- /dev/null +++ b/src/procedure2/IGCObject_DPrimitive_gco_0.cpp @@ -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 mm) noexcept -> Opaque + { + return self.shallow_copy(mm); + } + + auto + IGCObject_DPrimitive_gco_0::forward_children(DPrimitive_gco_0 & self, obj gc) noexcept -> size_type + { + return self.forward_children(gc); + } + + } /*namespace scm*/ +} /*namespace xo*/ + +/* end IGCObject_DPrimitive_gco_0.cpp */ diff --git a/src/procedure2/IPrintable_DPrimitive_gco_0.cpp b/src/procedure2/IPrintable_DPrimitive_gco_0.cpp new file mode 100644 index 0000000..af23021 --- /dev/null +++ b/src/procedure2/IPrintable_DPrimitive_gco_0.cpp @@ -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 */ diff --git a/src/procedure2/IProcedure_DPrimitive_gco_0.cpp b/src/procedure2/IProcedure_DPrimitive_gco_0.cpp new file mode 100644 index 0000000..220f566 --- /dev/null +++ b/src/procedure2/IProcedure_DPrimitive_gco_0.cpp @@ -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 rcx, const DArray * args) -> obj + { + return self.apply_nocheck(rcx, args); + } + + } /*namespace scm*/ +} /*namespace xo*/ + +/* end IProcedure_DPrimitive_gco_0.cpp */ diff --git a/src/procedure2/procedure2_register_facets.cpp b/src/procedure2/procedure2_register_facets.cpp index 6905e0b..111a307 100644 --- a/src/procedure2/procedure2_register_facets.cpp +++ b/src/procedure2/procedure2_register_facets.cpp @@ -5,6 +5,7 @@ #include "Procedure.hpp" #include "SimpleRcx.hpp" +#include "Primitive_gco_0.hpp" #include "Primitive_gco_2_gco_gco.hpp" #include @@ -25,6 +26,10 @@ namespace xo { FacetRegistry::register_impl(); + FacetRegistry::register_impl(); + FacetRegistry::register_impl(); + FacetRegistry::register_impl(); + FacetRegistry::register_impl(); FacetRegistry::register_impl(); FacetRegistry::register_impl(); diff --git a/src/procedure2/procedure2_register_types.cpp b/src/procedure2/procedure2_register_types.cpp index 497773d..a6467be 100644 --- a/src/procedure2/procedure2_register_types.cpp +++ b/src/procedure2/procedure2_register_types.cpp @@ -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 @@ -25,6 +26,7 @@ namespace xo { // (note: don't currently intend to support AGCObject for DSimpleRcx) + ok &= gc.install_type(impl_for()); ok &= gc.install_type(impl_for()); return ok;