HDK
|
Abstract interface for managing slapcomp. More...
#include <COP_SlapcompProgramManager.h>
Classes | |
struct | Callbacks |
struct | Output |
Public Member Functions | |
COP_SlapcompManager ()=default | |
COP_SlapcompManager (const COP_SlapcompManager &)=delete | |
COP_SlapcompManager (COP_SlapcompManager &&)=default | |
COP_SlapcompManager & | operator= (const COP_SlapcompManager &)=delete |
COP_SlapcompManager & | operator= (COP_SlapcompManager &&)=default |
virtual | ~COP_SlapcompManager ()=default |
virtual void | enable (int target_node_id, const OP_Context &)=0 |
Enable slapcomp with the given node. More... | |
void | enable (OP_Node *const node, const OP_Context &ctx) |
virtual void | disable ()=0 |
Disable slapcomp. More... | |
virtual bool | isEnabled () const =0 |
Returns the on-off state of slapcomp. More... | |
virtual bool | hasErrors () const =0 |
Returns true if the last run of slapcomp had errors. More... | |
virtual int | getTargetNode () const =0 |
Returns the id of the node slapcomp was built from. More... | |
virtual void | setErrorCallback (void(*cb)(void *, const char *), void *data)=0 |
Sets a callback that gets called when reporting slapcomp errors. More... | |
virtual void | setWarningCallback (void(*cb)(void *, const char *), void *data)=0 |
Sets a callback that gets called when reporting slapcomp warnings. More... | |
virtual void | setRunCallback (void(*cb)(void *), void *data)=0 |
Sets a callback that gets called when slapcomp is run. More... | |
virtual void | setUpdateCallback (void(*cb)(void *), void *data)=0 |
Sets a callback that gets called when slapcomp changes. More... | |
virtual bool | isSlapcompAOV (const UT_StringHolder &name) const =0 |
virtual bool | expectsLayerCameras () const |
bool | runSlapcomp (COP_SlapcompInputFetcher &input_fetcher, const OP_Context &context, bool should_build=true) |
bool | build (const COP_SlapcompInputFetcher &input_fetcher, const OP_Context &context) |
Prepares for applying slapcomp for the provided set of inputs. More... | |
virtual bool | buildForInputs (const COP_CableStructure &inputs, const OP_Context &context)=0 |
Prepares for applying slapcomp for inputs of the given types. More... | |
virtual void | runSlapcompImpl (COP_SlapcompInputFetcher &input_fetcher, const OP_Context &context)=0 |
Should run slapcomp with the specified inputs and context. More... | |
virtual COP_CableStructure | getOutputStructure () const =0 |
Should return the outputs that this slapcomp produces. More... | |
virtual IMX_LayerPtr | getOutputLayer (const UT_StringHolder &name) const =0 |
Returns a particular output by name. More... | |
virtual int | getVersion () const =0 |
virtual bool | hasStateChanged () const =0 |
UT_StringMap< Output > | getOutputs () const |
void | setCallbacks (const Callbacks &cbs) |
Set all callbacks using a struct. More... | |
virtual void | setVersion (int version)=0 |
Protected Member Functions | |
virtual void | reportError (const char *message)=0 |
Reports an error (through the callback if possible). More... | |
virtual void | reportWarning (const char *message)=0 |
Reports a warning (through the callback if possible). More... | |
void | reportAllErrorManagerErrors (const UT_ErrorManager &) |
Relays all warnings and messages from the error manager. More... | |
Abstract interface for managing slapcomp.
Definition at line 18 of file COP_SlapcompProgramManager.h.
|
default |
|
delete |
|
default |
|
virtualdefault |
|
inline |
Prepares for applying slapcomp for the provided set of inputs.
Definition at line 73 of file COP_SlapcompProgramManager.h.
|
pure virtual |
Prepares for applying slapcomp for inputs of the given types.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Disable slapcomp.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Enable slapcomp with the given node.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
inline |
Definition at line 31 of file COP_SlapcompProgramManager.h.
|
inlinevirtual |
Should return true if this slapcomp requires the input layers to bring in their cameras.
Reimplemented in COP_SlapcompProgramManager.
Definition at line 58 of file COP_SlapcompProgramManager.h.
|
pure virtual |
Returns a particular output by name.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
UT_StringMap<Output> COP_SlapcompManager::getOutputs | ( | ) | const |
Returns an output map constructed from the outputs of the last execution of the slapcomp program. This map is safe to use even after the program outputs change as a result of building or running it. If the program is not enabled or in an error state, the returned map will be empty.
|
pure virtual |
Should return the outputs that this slapcomp produces.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Returns the id of the node slapcomp was built from.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Returns a version number, which is incremented every time the program is rebuilt.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Returns true if the last run of slapcomp had errors.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Returns true if the last attempted application of slapcomp may have changed the possible outputs. This flag is is reset before each application of slapcomp.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Returns the on-off state of slapcomp.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Returns true if the slapcomp program ouputs an AOV with the given name. Should accept "color" as an alias for the "C" AOV.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
delete |
|
default |
|
protected |
Relays all warnings and messages from the error manager.
|
protectedpure virtual |
Reports an error (through the callback if possible).
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
protectedpure virtual |
Reports a warning (through the callback if possible).
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
inline |
Optionally builds and then runs slapcomp with the specified inputs and context. Returns successfulness.
Definition at line 62 of file COP_SlapcompProgramManager.h.
|
pure virtual |
Should run slapcomp with the specified inputs and context.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
Set all callbacks using a struct.
Definition at line 142 of file COP_SlapcompProgramManager.h.
|
pure virtual |
Sets a callback that gets called when reporting slapcomp errors.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
Sets a callback that gets called when slapcomp is run.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Sets a callback that gets called when slapcomp changes.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
This should really be private, but due to difficult visibility rules, we just settle for this... This should only be called by higher-level managers that interface with other managers.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.
|
pure virtual |
Sets a callback that gets called when reporting slapcomp warnings.
Implemented in COP_SlapcompProgramManager, and COP_SlapcompDispatcher.