ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Wrapper class which holds a pointer to a pointer to a CoroBaseContext. More...

#include <coroutines.h>

Collaboration diagram for Common::CoroContextHolder:

List of all members.

Public Member Functions

 CoroContextHolder (CoroContext &ctx)
 ~CoroContextHolder ()

Private Attributes

CoroContext_ctx

Detailed Description

Wrapper class which holds a pointer to a pointer to a CoroBaseContext.

The interesting part is the destructor, which kills the context being held, but ONLY if the _sleep val of that context is zero. This way, a coroutine can just 'return' w/o having to worry about freeing the allocated context (in Simon Tatham's original code, one had to use a special macro to return from a coroutine).

Definition at line 89 of file coroutines.h.


Constructor & Destructor Documentation

Common::CoroContextHolder::CoroContextHolder ( CoroContext ctx  )  [inline]

Definition at line 92 of file coroutines.h.

Common::CoroContextHolder::~CoroContextHolder (  )  [inline]

Definition at line 97 of file coroutines.h.


Member Data Documentation

Definition at line 90 of file coroutines.h.


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


Generated on Sat Mar 16 2019 05:05:31 for ResidualVM by doxygen 1.7.1
curved edge   curved edge