xo-interpreter2: + DVsmRcx. runtime context for vsm

This commit is contained in:
Roland Conybeare 2026-02-12 16:05:22 -05:00
commit 5e1eef3fc7
6 changed files with 113 additions and 4 deletions

View file

@ -1,2 +1,36 @@
/** @file DVsmRcx.hpp
n*
*
* @author Roland Conybeare, Feb 2026
**/
#pragma once
#include <xo/alloc2/Allocator.hpp>
namespace xo {
namespace scm {
// see xo-interpreter/ VirtualSchematikaMachine.hpp
class VirtualSchematikaMachine;
/** @brief Runtime context for schematika interpreter
*
* Provides allocator
**/
class DVsmRcx {
public:
using AAllocator = xo::mm::AAllocator;
public:
DVsmRcx(VirtualSchematikaMachine * vsm);
obj<AAllocator> allocator() const noexcept;
private:
/** schematika interpreter **/
VirtualSchematikaMachine * vsm_ = nullptr;;
};
} /*namespace scm*/
} /*namespace xo*/
/* end DVsmRcx.hpp */

View file

@ -70,6 +70,9 @@ namespace xo {
public:
VirtualSchematikaMachine(const VsmConfig & config);
/** allocator for schematika data **/
obj<AAllocator> allocator() const noexcept;
/** visit vsm-owned memory pools; call visitor(info) for each **/
void visit_pools(const MemorySizeVisitor & visitor) const;