From e5a4906ec7725e8a2d6dc3defb144c4cc1c9b482 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Thu, 15 Jan 2026 00:50:12 -0500 Subject: [PATCH] xo-object2: streamline IPrintable_DFloat + codegen --- xo-object2/CMakeLists.txt | 2 +- xo-object2/idl/IPrintable_DFloat.json5 | 1 + .../xo/object2/{ => number}/IPrintable_DFloat.hpp | 9 +++++++-- xo-object2/src/object2/IPrintable_DFloat.cpp | 4 ++-- xo-object2/src/object2/object2_register_facets.cpp | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) rename xo-object2/include/xo/object2/{ => number}/IPrintable_DFloat.hpp (82%) diff --git a/xo-object2/CMakeLists.txt b/xo-object2/CMakeLists.txt index ff21115c..396bac1a 100644 --- a/xo-object2/CMakeLists.txt +++ b/xo-object2/CMakeLists.txt @@ -72,7 +72,7 @@ xo_add_genfacetimpl( REPR Float INPUT idl/IPrintable_DFloat.json5 OUTPUT_HPP_DIR include/xo/object2 - OUTPUT_IMPL_SUBDIR . + OUTPUT_IMPL_SUBDIR number OUTPUT_CPP_DIR src/object2 ) diff --git a/xo-object2/idl/IPrintable_DFloat.json5 b/xo-object2/idl/IPrintable_DFloat.json5 index 10673d3f..7351c1b2 100644 --- a/xo-object2/idl/IPrintable_DFloat.json5 +++ b/xo-object2/idl/IPrintable_DFloat.json5 @@ -2,6 +2,7 @@ mode: "implementation", includes: [ "", "" ], + local_types: [ ], namespace1: "xo", namespace2: "scm", facet_idl: "idl/Printable.json5", diff --git a/xo-object2/include/xo/object2/IPrintable_DFloat.hpp b/xo-object2/include/xo/object2/number/IPrintable_DFloat.hpp similarity index 82% rename from xo-object2/include/xo/object2/IPrintable_DFloat.hpp rename to xo-object2/include/xo/object2/number/IPrintable_DFloat.hpp index 0ac94b9f..17eab5d2 100644 --- a/xo-object2/include/xo/object2/IPrintable_DFloat.hpp +++ b/xo-object2/include/xo/object2/number/IPrintable_DFloat.hpp @@ -2,17 +2,18 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/home/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] * arguments: * --input [idl/IPrintable_DFloat.json5] * 2. jinja2 template for abstract facet .hpp file: - * [iface_facet_any.hpp.j2] + * [iface_facet_repr.hpp.j2] * 3. idl for facet methods * [idl/IPrintable_DFloat.json5] **/ #pragma once +#include "Printable.hpp" #include #include #include "DFloat.hpp" @@ -41,13 +42,17 @@ namespace xo { /** @defgroup scm-printable-dfloat-type-traits **/ ///@{ using ppindentinfo = xo::print::APrintable::ppindentinfo; + using Copaque = xo::print::APrintable::Copaque; + using Opaque = xo::print::APrintable::Opaque; ///@} /** @defgroup scm-printable-dfloat-methods **/ ///@{ + // const methods /** Pretty-printing support for this object. See [xo-indentlog/xo/indentlog/pretty.hpp] **/ static bool pretty(const DFloat & self, const ppindentinfo & ppii); + // non-const methods ///@} }; diff --git a/xo-object2/src/object2/IPrintable_DFloat.cpp b/xo-object2/src/object2/IPrintable_DFloat.cpp index b459e384..b83613e5 100644 --- a/xo-object2/src/object2/IPrintable_DFloat.cpp +++ b/xo-object2/src/object2/IPrintable_DFloat.cpp @@ -2,7 +2,7 @@ * * Generated automagically from ingredients: * 1. code generator: - * [/home/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] + * [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet] * arguments: * --input [idl/IPrintable_DFloat.json5] * 2. jinja2 template for abstract facet .hpp file: @@ -11,7 +11,7 @@ * [idl/IPrintable_DFloat.json5] **/ -#include "IPrintable_DFloat.hpp" +#include "number/IPrintable_DFloat.hpp" namespace xo { namespace scm { diff --git a/xo-object2/src/object2/object2_register_facets.cpp b/xo-object2/src/object2/object2_register_facets.cpp index efbb2a08..94de94c6 100644 --- a/xo-object2/src/object2/object2_register_facets.cpp +++ b/xo-object2/src/object2/object2_register_facets.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include