xo-umbrella2/xo-object2/src/object2/DFloat.cpp
Roland Conybeare dff1b8e6ad git subrepo clone git@github.com:Rconybea/xo-object2.git xo-object2
subrepo:
  subdir:   "xo-object2"
  merged:   "8156e514"
upstream:
  origin:   "git@github.com:Rconybea/xo-object2.git"
  branch:   "main"
  commit:   "8156e514"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 22:16:08 -04:00

45 lines
1,021 B
C++

/** @file DFloat.cpp
*
* @author Roland Conybeare, Dec 2025
**/
#include "DFloat.hpp"
#include <xo/indentlog/print/pretty.hpp>
namespace xo {
using xo::facet::typeseq;
using xo::print::ppdetail_atomic;
using std::size_t;
namespace scm {
DFloat *
DFloat::_box(obj<AAllocator> mm, double x)
{
void * mem = mm.alloc(typeseq::id<DFloat>(),
sizeof(DFloat));
return new (mem) DFloat(x);
}
bool
DFloat::pretty(const ppindentinfo & ppii) const
{
return ppdetail_atomic<double>::print_pretty(ppii, value_);
}
DFloat *
DFloat::gco_shallow_move(obj<AGCObjectVisitor> gc) noexcept
{
return gc.std_move_for(this);
}
void
DFloat::visit_gco_children(VisitReason, obj<AGCObjectVisitor>) noexcept
{
// noop -- childless!
}
} /*namespace scm*/
} /*namespace xo*/
/* end DFloat.cpp */