chigraph  master
Systems programming language written for beginners in LLVM
chi::Result::ScopedContext Struct Reference

A helper object for contexts that should be removed at the end of a scope. More...

#include <chi/Support/Result.hpp>

+ Collaboration diagram for chi::Result::ScopedContext:

Public Member Functions

 ScopedContext (Result &res, int ctxId)
 Create a scoped context object. More...
 
 ~ScopedContext ()
 Destructor–does the magic of remving itsself from the result.
 

Public Attributes

const int contextId
 The ID for this context.
 
Resultresult
 The result object.
 

Detailed Description

A helper object for contexts that should be removed at the end of a scope.

Definition at line 74 of file Result.hpp.

Constructor & Destructor Documentation

◆ ScopedContext()

chi::Result::ScopedContext::ScopedContext ( Result res,
int  ctxId 
)
inline

Create a scoped context object.

Parameters
resThe Result to add it to
ctxIdThe ID of this context object

Definition at line 78 of file Result.hpp.

References contextId.


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