xo-objectd2 xo-printable xo-facet: pp working for List(Integer)
Also streamline facet switching
This commit is contained in:
parent
9ce465e84f
commit
09ee3a20ac
23 changed files with 508 additions and 27 deletions
32
xo-object2/src/object2/DInteger.cpp
Normal file
32
xo-object2/src/object2/DInteger.cpp
Normal 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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue