xo-umbrella2/xo-interpreter2/include/xo/interpreter2/DVsmRcx.hpp
Roland Conybeare 7f4b4e7cbd git subrepo clone (merge) git@github.com:Rconybea/xo-interpreter2.git xo-interpreter2
subrepo:
  subdir:   "xo-interpreter2"
  merged:   "e4c6ff57"
upstream:
  origin:   "git@github.com:Rconybea/xo-interpreter2.git"
  branch:   "main"
  commit:   "e4c6ff57"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 22:13:05 -04:00

44 lines
1.3 KiB
C++

/** @file DVsmRcx.hpp
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include <xo/stringtable2/StringTable.hpp>
#include <xo/alloc2/Allocator.hpp>
#include <xo/arena/MemorySizeInfo.hpp>
namespace xo {
namespace scm {
// see xo-interpreter/ VirtualSchematikaMachine.hpp
class DVirtualSchematikaMachine;
/** @brief Runtime context for schematika interpreter
*
* Provides allocator
**/
class DVsmRcx {
public:
using StringTable = xo::scm::StringTable;
using AAllocator = xo::mm::AAllocator;
using ACollector = xo::mm::ACollector;
using MemorySizeVisitor = xo::mm::MemorySizeVisitor;
public:
DVsmRcx(DVirtualSchematikaMachine * vsm);
obj<AAllocator> allocator() const noexcept;
obj<ACollector> collector() const noexcept;
StringTable * stringtable() const noexcept;
obj<AAllocator> error_allocator() const noexcept;
void visit_pools(const MemorySizeVisitor & visitor) const;
private:
/** schematika interpreter **/
DVirtualSchematikaMachine * vsm_ = nullptr;;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DVsmRcx.hpp */