xo-umbrella2/xo-process/include/xo/process/RealizationState.hpp
Roland Conybeare 81a8a3dd84 git subrepo clone (merge) git@github.com:Rconybea/xo-process.git xo-process
subrepo:
  subdir:   "xo-process"
  merged:   "ff603471"
upstream:
  origin:   "git@github.com:Rconybea/xo-process.git"
  branch:   "main"
  commit:   "ff603471"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 22:17:23 -04:00

42 lines
1.1 KiB
C++

/* file RealizationState.hpp
*
* author: Roland Conybeare, Nov 2022
*/
#pragma once
#include <utility>
/* opaque type representing state of an unfolding
* realization, for a StochasticProcess.
* Needs runtime polymorphism here so we can stack states
* e.g. to represent realization state for a process
* defined by transformation of another process.
* For example see ExpProcess.
* For now we don't refcount these; expect each process-realization
* to create its own stack, managed with unique_ptr<>
*
* See also:
* - ProcessRealization2
* - Realizable2Process
*/
class AbstractRealizationState {
public:
AbstractRealizationState() = default;
virtual ~AbstractRealizationState() = default;
}; /*RealizationState*/
template<typename Rstate>
class RealizationState : public AbstractRealizationState {
public:
RealizationState(Rstate const & rs) : rstate_{rs} {}
RealizationState(Rstate && rs) : rstate_{std::move(rs)} {}
Rstate * p_rstate() { return &rstate_; }
private:
Rstate rstate_;
}; /*RealizationState*/
/* end RealizationState.hpp */