Loading...
Searching...
No Matches
eonc::PotentialConstructionScope Class Reference

RAII: Potential default construction records on this registry instead of PotRegistry::get(). More...

#include <Potential.h>

Public Member Functions

 PotentialConstructionScope (IPotRegistry &registry)
 ~PotentialConstructionScope ()
 PotentialConstructionScope (const PotentialConstructionScope &)=delete
PotentialConstructionScope & operator= (const PotentialConstructionScope &)=delete

Private Attributes

IPotRegistry * prev_

Detailed Description

RAII: Potential default construction records on this registry instead of PotRegistry::get().

Job/makePotential(Runtime&) uses this so the production path does not touch the process singleton.

Definition at line 30 of file Potential.h.

Constructor & Destructor Documentation

◆ PotentialConstructionScope() [1/2]

eonc::PotentialConstructionScope::PotentialConstructionScope ( IPotRegistry & registry)
explicit

Definition at line 20 of file PotentialParams.cpp.

21 : prev_(tls_construction_registry) {
22 tls_construction_registry = &registry;
23}

◆ ~PotentialConstructionScope()

eonc::PotentialConstructionScope::~PotentialConstructionScope ( )

Definition at line 25 of file PotentialParams.cpp.

25 {
26 tls_construction_registry = prev_;
27}

◆ PotentialConstructionScope() [2/2]

eonc::PotentialConstructionScope::PotentialConstructionScope ( const PotentialConstructionScope & )
delete

Member Function Documentation

◆ operator=()

PotentialConstructionScope & eonc::PotentialConstructionScope::operator= ( const PotentialConstructionScope & )
delete

Member Data Documentation

◆ prev_

IPotRegistry* eonc::PotentialConstructionScope::prev_
private

Definition at line 39 of file Potential.h.


The documentation for this class was generated from the following files: