xo-procedure2: streamline DSimpleRcx + regen facet *.pp
This commit is contained in:
parent
4d6404776e
commit
cf5029274f
23 changed files with 83 additions and 49 deletions
|
|
@ -91,12 +91,12 @@ xo_add_genfacetimpl(
|
|||
OUTPUT_CPP_DIR src/procedure2
|
||||
)
|
||||
|
||||
add_subdirectory(src/procedure2)
|
||||
add_subdirectory(utest)
|
||||
xo_add_genfacet_all(xo-procedure2-genfacet-all)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
xo_add_genfacet_all(xo-procedure2-genfacet-all)
|
||||
add_subdirectory(src/procedure2)
|
||||
add_subdirectory(utest)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# cmake export
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/Procedure.json5]
|
||||
* 2. jinja2 template for facet .hpp file:
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
#include "detail/RProcedure.hpp"
|
||||
|
||||
|
||||
/* end Procedure.hpp */
|
||||
/* end Procedure.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/RuntimeContext.json5]
|
||||
* 2. jinja2 template for facet .hpp file:
|
||||
|
|
@ -19,4 +19,4 @@
|
|||
#include "detail/RRuntimeContext.hpp"
|
||||
|
||||
|
||||
/* end RuntimeContext.hpp */
|
||||
/* end RuntimeContext.hpp */
|
||||
|
|
|
|||
11
include/xo/procedure2/SimpleRcx.hpp
Normal file
11
include/xo/procedure2/SimpleRcx.hpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/** @file SimpleRcx.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2026
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DSimpleRcx.hpp"
|
||||
#include "detail/IRuntimeContext_DSimpleRcx.hpp"
|
||||
|
||||
/* end SimpleRcx.hpp */
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/Procedure.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -49,6 +49,8 @@ public:
|
|||
// const methods
|
||||
/** RTTI: unique id# for actual runtime data representation **/
|
||||
virtual typeseq _typeseq() const noexcept = 0;
|
||||
/** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/
|
||||
virtual void _drop(Opaque d) const noexcept = 0;
|
||||
/** true iff procedure takes n arguments **/
|
||||
virtual bool is_nary(Copaque data) const noexcept = 0;
|
||||
/** number of arguments. -1 for n-ary **/
|
||||
|
|
@ -76,4 +78,4 @@ using IProcedure_ImplType = xo::facet::FacetImplType<AProcedure, DRepr>;
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* AProcedure.hpp */
|
||||
/* AProcedure.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/RuntimeContext.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -47,6 +47,8 @@ public:
|
|||
// const methods
|
||||
/** RTTI: unique id# for actual runtime data representation **/
|
||||
virtual typeseq _typeseq() const noexcept = 0;
|
||||
/** destroy instance @p d; calls c++ dtor only for actual runtime type; does not recover memory **/
|
||||
virtual void _drop(Opaque d) const noexcept = 0;
|
||||
/** default allocator to use for objects **/
|
||||
virtual obj<AAllocator> allocator(Copaque data) const noexcept = 0;
|
||||
|
||||
|
|
@ -70,4 +72,4 @@ using IRuntimeContext_ImplType = xo::facet::FacetImplType<ARuntimeContext, DRepr
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* ARuntimeContext.hpp */
|
||||
/* ARuntimeContext.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DPrimitive_gco_2_gco_gco.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DPrimitive_gco_2_gco_gco.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/Procedure.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -54,8 +54,11 @@ namespace scm {
|
|||
|
||||
// from AProcedure
|
||||
|
||||
// const methods
|
||||
// builtin methods
|
||||
typeseq _typeseq() const noexcept override { return s_typeseq; }
|
||||
[[noreturn]] void _drop(Opaque) const noexcept override { _fatal(); }
|
||||
|
||||
// const methods
|
||||
[[noreturn]] bool is_nary(Copaque) const noexcept override { _fatal(); }
|
||||
[[noreturn]] std::int32_t n_args(Copaque) const noexcept override { _fatal(); }
|
||||
|
||||
|
|
@ -85,4 +88,4 @@ namespace scm {
|
|||
} /*namespace scm */
|
||||
} /*namespace xo */
|
||||
|
||||
/* IProcedure_Any.hpp */
|
||||
/* IProcedure_Any.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IProcedure_DPrimitive_gco_2_gco_gco.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/Procedure.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -40,8 +40,11 @@ namespace scm {
|
|||
|
||||
// from AProcedure
|
||||
|
||||
// const methods
|
||||
// builtin methods
|
||||
typeseq _typeseq() const noexcept override { return s_typeseq; }
|
||||
void _drop(Opaque d) const noexcept override { _dcast(d).~DRepr(); }
|
||||
|
||||
// const methods
|
||||
bool is_nary(Copaque data) const noexcept override {
|
||||
return I::is_nary(_dcast(data));
|
||||
}
|
||||
|
|
@ -85,4 +88,4 @@ namespace scm {
|
|||
} /*namespace scm */
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IProcedure_Xfer.hpp */
|
||||
/* end IProcedure_Xfer.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/RuntimeContext.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -54,8 +54,11 @@ namespace scm {
|
|||
|
||||
// from ARuntimeContext
|
||||
|
||||
// const methods
|
||||
// builtin methods
|
||||
typeseq _typeseq() const noexcept override { return s_typeseq; }
|
||||
[[noreturn]] void _drop(Opaque) const noexcept override { _fatal(); }
|
||||
|
||||
// const methods
|
||||
[[noreturn]] obj<AAllocator> allocator(Copaque) const noexcept override { _fatal(); }
|
||||
|
||||
// nonconst methods
|
||||
|
|
@ -83,4 +86,4 @@ namespace scm {
|
|||
} /*namespace scm */
|
||||
} /*namespace xo */
|
||||
|
||||
/* IRuntimeContext_Any.hpp */
|
||||
/* IRuntimeContext_Any.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IRuntimeContext_DSimpleRcx.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/RuntimeContext.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -39,8 +39,11 @@ namespace scm {
|
|||
|
||||
// from ARuntimeContext
|
||||
|
||||
// const methods
|
||||
// builtin methods
|
||||
typeseq _typeseq() const noexcept override { return s_typeseq; }
|
||||
void _drop(Opaque d) const noexcept override { _dcast(d).~DRepr(); }
|
||||
|
||||
// const methods
|
||||
obj<AAllocator> allocator(Copaque data) const noexcept override {
|
||||
return I::allocator(_dcast(data));
|
||||
}
|
||||
|
|
@ -78,4 +81,4 @@ namespace scm {
|
|||
} /*namespace scm */
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IRuntimeContext_Xfer.hpp */
|
||||
/* end IRuntimeContext_Xfer.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/Procedure.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -46,8 +46,11 @@ public:
|
|||
/** @defgroup scm-procedure-router-methods **/
|
||||
///@{
|
||||
|
||||
// const methods
|
||||
// builtin methods
|
||||
typeseq _typeseq() const noexcept { return O::iface()->_typeseq(); }
|
||||
void _drop() const noexcept { O::iface()->_drop(O::data()); }
|
||||
|
||||
// const methods
|
||||
bool is_nary() const noexcept {
|
||||
return O::iface()->is_nary(O::data());
|
||||
}
|
||||
|
|
@ -83,4 +86,4 @@ namespace xo { namespace facet {
|
|||
};
|
||||
} }
|
||||
|
||||
/* end RProcedure.hpp */
|
||||
/* end RProcedure.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/RuntimeContext.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -46,8 +46,11 @@ public:
|
|||
/** @defgroup scm-runtimecontext-router-methods **/
|
||||
///@{
|
||||
|
||||
// const methods
|
||||
// builtin methods
|
||||
typeseq _typeseq() const noexcept { return O::iface()->_typeseq(); }
|
||||
void _drop() const noexcept { O::iface()->_drop(O::data()); }
|
||||
|
||||
// const methods
|
||||
obj<AAllocator> allocator() const noexcept {
|
||||
return O::iface()->allocator(O::data());
|
||||
}
|
||||
|
|
@ -77,4 +80,4 @@ namespace xo { namespace facet {
|
|||
};
|
||||
} }
|
||||
|
||||
/* end RRuntimeContext.hpp */
|
||||
/* end RRuntimeContext.hpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IGCObject_DPrimitive_gco_2_gco_gco.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -36,4 +36,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IGCObject_DPrimitive_gco_2_gco_gco.cpp */
|
||||
/* end IGCObject_DPrimitive_gco_2_gco_gco.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DPrimitive_gco_2_gco_gco.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DPrimitive_gco_2_gco_gco.cpp */
|
||||
/* end IPrintable_DPrimitive_gco_2_gco_gco.cpp */
|
||||
|
|
|
|||
|
|
@ -44,4 +44,4 @@ IProcedure_Any::apply_nocheck(Opaque, obj<ARuntimeContext>, const DArray *) ->
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IProcedure_Any.cpp */
|
||||
/* end IProcedure_Any.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IProcedure_DPrimitive_gco_2_gco_gco.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -36,4 +36,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IProcedure_DPrimitive_gco_2_gco_gco.cpp */
|
||||
/* end IProcedure_DPrimitive_gco_2_gco_gco.cpp */
|
||||
|
|
|
|||
|
|
@ -38,4 +38,4 @@ IRuntimeContext_Any::_valid
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IRuntimeContext_Any.cpp */
|
||||
/* end IRuntimeContext_Any.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IRuntimeContext_DSimpleRcx.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IRuntimeContext_DSimpleRcx.cpp */
|
||||
/* end IRuntimeContext_DSimpleRcx.cpp */
|
||||
|
|
|
|||
|
|
@ -3,12 +3,9 @@
|
|||
* @author Roland Conybeare, Jan 2026
|
||||
**/
|
||||
|
||||
#include "DSimpleRcx.hpp"
|
||||
#include "detail/IRuntimeContext_DSimpleRcx.hpp"
|
||||
|
||||
#include "DPrimitive_gco_2_gco_gco.hpp"
|
||||
#include "detail/IGCObject_DPrimitive_gco_2_gco_gco.hpp"
|
||||
#include "detail/IPrintable_DPrimitive_gco_2_gco_gco.hpp"
|
||||
#include "Procedure.hpp"
|
||||
#include "SimpleRcx.hpp"
|
||||
#include "Primitive_gco_2_gco_gco.hpp"
|
||||
|
||||
#include <xo/gc/GCObject.hpp>
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
|
|
@ -28,12 +25,16 @@ namespace xo {
|
|||
|
||||
FacetRegistry::register_impl<ARuntimeContext, DSimpleRcx>();
|
||||
|
||||
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>();
|
||||
|
||||
log && log(xtag("DSimpleRcx.tseq", typeseq::id<DSimpleRcx>()));
|
||||
log && log(xtag("DPrimitive_gco_2_gco_gco.tseq", typeseq::id<DPrimitive_gco_2_gco_gco>()));
|
||||
|
||||
log && log(xtag("ARuntimeContext.tseq", typeseq::id<ARuntimeContext>()));
|
||||
log && log(xtag("AProcedure.tseq", typeseq::id<AProcedure>()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue