xo-objectd2 xo-printable xo-facet: pp working for List(Integer)

Also streamline facet switching
This commit is contained in:
Roland Conybeare 2026-01-09 17:48:54 -05:00
commit 09ee3a20ac
23 changed files with 508 additions and 27 deletions

View file

@ -0,0 +1,32 @@
/** @file DInteger.cpp
*
* @author Roland Conybeare, Jan 2026
**/
#include "DInteger.hpp"
#include <xo/indentlog/print/pretty.hpp>
namespace xo {
using xo::facet::typeseq;
using xo::print::ppdetail_atomic;
namespace scm {
DInteger *
DInteger::make(obj<AAllocator> mm,
long x)
{
void * mem = mm.alloc(typeseq::id<DInteger>(),
sizeof(DInteger));
return new (mem) DInteger(x);
}
bool
DInteger::pretty(const ppindentinfo & ppii) const
{
return ppdetail_atomic<long>::print_pretty(ppii, value_);
}
} /*namespace scm*/
} /*namespace xo*/
/* end DInteger.cpp */