Cortex
10.0.0-a4
|
#include <ScopedContext.h>
Inherits noncopyable.
Public Member Functions | |
ScopedContext (RtContextHandle context) | |
~ScopedContext () | |
The ScopedContext class makes it easy to manage calls to RiContext() so you can manage calls to many contexts relatively easily, with little fear of Exceptions or multiple return paths leaving you in the wrong context.
IECoreRI::ScopedContext::ScopedContext | ( | RtContextHandle | context | ) |
Saves the current context and instates the specified context with RiContext(). If context is RI_NULL then does nothing.
IECoreRI::ScopedContext::~ScopedContext | ( | ) |
Restores the previously saved context, unless the context specified in the constructor was RI_NULL in which case it does nothing.