Cortex
10.0.0-a4
|
#include <EditBlock.h>
Inherits noncopyable.
Public Member Functions | |
EditBlock (Renderer *renderer, const std::string &editType, const CompoundDataMap ¶meters) | |
~EditBlock () | |
Closes the edit block by calling renderer->editEnd(). | |
def | __init__ (self, renderer, editType, parameters) |
def | __enter__ (self) |
def | __exit__ (self, type, value, traceBack) |
The EditBlock class provides a simple means of ensuring that renderer->editBegin() calls are matched by renderer->editEnd() calls, even in the face of exceptions and multiple return statements from a function.
IECore::EditBlock::EditBlock | ( | Renderer * | renderer, |
const std::string & | editType, | ||
const CompoundDataMap & | parameters | ||
) |
Starts a new edit block, calling renderer->editBegin(). If renderer is NULL then nothing is done, otherwise it is the responsibility of the caller to ensure the renderer remains alive for the lifetime of this object.