stim::environment class

A shared system environment context for soft-tissue simulations.

Environments act as the bridge between simulations and their host application/system/engine. They enable memory allocation, threading, logging, and file I/O through implementations of various interface types. Environments be shared between as many simulations as is required:

stim::cache_interface
stim::cache_interface
stim::log_interface
stim::log_interface
stim::executor_interface
stim::executor_interfa...
shared memory
buffer
shared memory...
Core subsystem/engine
stim::environment
stim::environment
stim::simulation
stim::simulation
stim::simulation
stim::simulation
stim::simulation
stim::simulation
... and so on
... and so on
Text is not SVG - cannot display

Constructors, destructors, conversion operators

environment() defaulted noexcept
Default-constructs a 'null' environment.
environment(environment&& other) noexcept
Move constructor.
operator bool() const explicit noexcept
Returns true if this environment object is not 'null' (i.e. not default-constructed or moved-from).
~environment() noexcept
Destructor.

Public functions

auto operator=(environment&& rhs) -> environment& noexcept
Move-assignment operator.

Creating an environment

static auto create(const environment_description& desc) -> result<environment> noexcept
Creates an environment.

Function documentation

stim::environment::environment() defaulted noexcept

Default-constructs a 'null' environment.

static result<environment> stim::environment::create(const environment_description& desc) noexcept

Creates an environment.

Parameters
desc The environment description.
Returns A new environment, or an error message detailing why instantiation failed.

result<environment> create_environment(const environment_description& desc) noexcept

Creates a stim::environment.

Parameters
desc The environment description.
Returns A new system environment, or an error message detailing why instantiation failed.