Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
StackScopeManager< buffSiz > Class Template Reference

#include "lib/diff/tree-diff-application.hpp"

Description

template<size_t buffSiz>
class lib::diff::StackScopeManager< buffSiz >

Typical standard implementation of the ScopeManager.

Using Heap memory for the nested scopes, we create a stack of opaque InPlaceBuffers for each scope, which allows the PlantingHandle mechanism to let the target object corresponding to this scope build its own TreeMutator implementation into this buffer space for this scope.

Definition at line 170 of file tree-diff-application.hpp.

Public Member Functions

 StackScopeManager ()
 
TreeMutatorcurrentScope () const
 
virtual TreeMutator::Handle openScope ()
 
virtual TreeMutatorcloseScope ()
 
virtual void clear ()
 
virtual size_t depth () const
 
- Public Member Functions inherited from ScopeManager
virtual ~ScopeManager ()
 this is an interface
 

Private Types

using MutatorBuffer = InPlaceBuffer< TreeMutator, buffSiz >
 
using MutatorStack = std::stack< MutatorBuffer >
 

Private Attributes

MutatorStack scopes_
 Allocate Heap Storage for nested TreeMutator(s)
 

Constructor & Destructor Documentation

◆ StackScopeManager()

template<size_t buffSiz>
StackScopeManager ( )
inline

Definition at line 181 of file tree-diff-application.hpp.

Member Typedef Documentation

◆ MutatorBuffer

template<size_t buffSiz>
using MutatorBuffer = InPlaceBuffer<TreeMutator, buffSiz>
private

Definition at line 173 of file tree-diff-application.hpp.

◆ MutatorStack

template<size_t buffSiz>
using MutatorStack = std::stack<MutatorBuffer>
private

Definition at line 174 of file tree-diff-application.hpp.

Member Function Documentation

◆ currentScope()

template<size_t buffSiz>
TreeMutator & currentScope ( ) const
inline

Definition at line 186 of file tree-diff-application.hpp.

References StackScopeManager< buffSiz >::depth(), and StackScopeManager< buffSiz >::scopes_.

Referenced by DiffApplicationStrategy< TAR, enable_if< TreeDiffTraits< TAR > > >::initDiffApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openScope()

template<size_t buffSiz>
virtual TreeMutator::Handle openScope ( )
inlinevirtual
Remarks
picks up treeMutatorSize(...)

Implements ScopeManager.

Definition at line 199 of file tree-diff-application.hpp.

References PlantingHandle< BA, DEFAULT >::emplace(), and StackScopeManager< buffSiz >::scopes_.

Referenced by DiffApplicationStrategy< TAR, enable_if< TreeDiffTraits< TAR > > >::buildMutator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closeScope()

template<size_t buffSiz>
virtual TreeMutator & closeScope ( )
inlinevirtual

Implements ScopeManager.

Definition at line 207 of file tree-diff-application.hpp.

References StackScopeManager< buffSiz >::depth(), and StackScopeManager< buffSiz >::scopes_.

+ Here is the call graph for this function:

◆ clear()

template<size_t buffSiz>
virtual void clear ( )
inlinevirtual

Implements ScopeManager.

Definition at line 215 of file tree-diff-application.hpp.

References StackScopeManager< buffSiz >::scopes_.

Referenced by DiffApplicationStrategy< TAR, enable_if< TreeDiffTraits< TAR > > >::buildMutator(), and DiffApplicationStrategy< TAR, enable_if< TreeDiffTraits< TAR > > >::completeDiffApplication().

+ Here is the caller graph for this function:

◆ depth()

template<size_t buffSiz>
virtual size_t depth ( ) const
inlinevirtual

Implements ScopeManager.

Definition at line 225 of file tree-diff-application.hpp.

References StackScopeManager< buffSiz >::scopes_.

Referenced by StackScopeManager< buffSiz >::closeScope(), and StackScopeManager< buffSiz >::currentScope().

+ Here is the caller graph for this function:

Member Data Documentation

◆ scopes_

+ Inheritance diagram for StackScopeManager< buffSiz >:
+ Collaboration diagram for StackScopeManager< buffSiz >:

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