xo-interpreter2: + DVsmRcx. runtime context for vsm
This commit is contained in:
parent
e219ea0db3
commit
5e1eef3fc7
6 changed files with 113 additions and 4 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue