xo-reader2: + IPrintable+DDefineSsm

This commit is contained in:
Roland Conybeare 2026-01-20 01:19:47 -05:00
commit 0a7e8468ae
8 changed files with 133 additions and 0 deletions

View file

@ -73,6 +73,7 @@ namespace xo {
public:
using AAllocator = xo::mm::AAllocator;
using DArena = xo::mm::DArena;
using ppindentinfo = xo::print::ppindentinfo;
public:
/** @defgroup scm-define-ssm-facet constructors **/
@ -133,6 +134,12 @@ namespace xo {
ParserStateMachine * p_psm);
///@}
/** @defgroup scm-define-printable-facet printable facet methods **/
///@{
bool pretty(const ppindentinfo & ppii) const;
///@}
private:
/** identify define-expression state **/

View file

@ -0,0 +1,62 @@
/** @file IPrintable_DDefineSsm.hpp
*
* Generated automagically from ingredients:
* 1. code generator:
* [/Users/roland/proj/xo-umbrella2/xo-facet/codegen/genfacet]
* arguments:
* --input [idl/IPrintable_DDefineSsm.json5]
* 2. jinja2 template for abstract facet .hpp file:
* [iface_facet_repr.hpp.j2]
* 3. idl for facet methods
* [idl/IPrintable_DDefineSsm.json5]
**/
#pragma once
#include "Printable.hpp"
#include <xo/printable2/Printable.hpp>
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
#include "DDefineSsm.hpp"
namespace xo { namespace scm { class IPrintable_DDefineSsm; } }
namespace xo {
namespace facet {
template <>
struct FacetImplementation<xo::print::APrintable,
xo::scm::DDefineSsm>
{
using ImplType = xo::print::IPrintable_Xfer
<xo::scm::DDefineSsm,
xo::scm::IPrintable_DDefineSsm>;
};
}
}
namespace xo {
namespace scm {
/** @class IPrintable_DDefineSsm
**/
class IPrintable_DDefineSsm {
public:
/** @defgroup scm-printable-ddefinessm-type-traits **/
///@{
using ppindentinfo = xo::print::APrintable::ppindentinfo;
using Copaque = xo::print::APrintable::Copaque;
using Opaque = xo::print::APrintable::Opaque;
///@}
/** @defgroup scm-printable-ddefinessm-methods **/
///@{
// const methods
/** Pretty-printing support for this object.
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
static bool pretty(const DDefineSsm & self, const ppindentinfo & ppii);
// non-const methods
///@}
};
} /*namespace scm*/
} /*namespace xo*/
/* end */