| 
    HDK
    
   | 
 
#include <COP_SlapcompDispatcher.h>
 Inheritance diagram for COP_SlapcompDispatcher:Public Types | |
| using | Callbacks = COP_SlapcompManager::Callbacks | 
| using | CheckFunction = bool(*)(const OP_Node *) | 
| Should return true for nodes that are supported by the slapcomp type.  More... | |
| using | AllocationFunction ) = COP_SlapcompManager *(*)( | 
Public Member Functions | |
| COP_SlapcompDispatcher () | |
| COP_SlapcompDispatcher (const COP_SlapcompDispatcher &)=delete | |
| COP_SlapcompDispatcher (COP_SlapcompDispatcher &&) | |
| COP_SlapcompDispatcher & | operator= (const COP_SlapcompDispatcher &)=delete | 
| COP_SlapcompDispatcher & | operator= (COP_SlapcompDispatcher &&) | 
| void | copyFrom (const COP_SlapcompDispatcher &other, const OP_Context &context) | 
| Makes this object a copy of other, including the enable state.  More... | |
| void | enable (int target_node_id, const OP_Context &) override | 
| Enable slapcomp with the given node.  More... | |
| void | enable (OP_Node *const node, const OP_Context &ctx) | 
| void | disable () override | 
| Disable slapcomp.  More... | |
| bool | isEnabled () const override | 
| Returns the on-off state of slapcomp.  More... | |
| bool | hasErrors () const override | 
| Returns true if the last run of slapcomp had errors.  More... | |
| int | getTargetNode () const override | 
| Returns the id of the node slapcomp was built from.  More... | |
| void | setErrorCallback (void(*cb)(void *, const char *), void *data) override | 
| Sets a callback that gets called when reporting slapcomp errors.  More... | |
| void | setWarningCallback (void(*cb)(void *, const char *), void *data) override | 
| Sets a callback that gets called when reporting slapcomp warnings.  More... | |
| void | setRunCallback (void(*cb)(void *), void *data) override | 
| Sets a callback that gets called when slapcomp is run.  More... | |
| void | setUpdateCallback (void(*cb)(void *), void *data) override | 
| Sets a callback that gets called when slapcomp changes.  More... | |
| bool | isSlapcompAOV (const UT_StringHolder &name) const override | 
| bool | buildForInputs (const COP_CableStructure &inputs, const OP_Context &context) override | 
| Prepares for applying slapcomp for inputs of the given types.  More... | |
| void | runSlapcompImpl (COP_SlapcompInputFetcher &input_fetcher, const OP_Context &context) override | 
| Should run slapcomp with the specified inputs and context.  More... | |
| COP_CableStructure | getOutputStructure () const override | 
| Should return the outputs that this slapcomp produces.  More... | |
| IMX_LayerPtr | getOutputLayer (const UT_StringHolder &name) const override | 
| Returns a particular output by name.  More... | |
| int | getVersion () const override | 
| bool | hasStateChanged () const override | 
| void | setVersion (int version) override | 
  Public Member Functions inherited from COP_SlapcompManager | |
| 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 | 
| void | enable (OP_Node *const node, const OP_Context &ctx) | 
| 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... | |
| UT_StringMap< Output > | getOutputs () const | 
| void | setCallbacks (const Callbacks &cbs) | 
| Set all callbacks using a struct.  More... | |
Static Public Member Functions | |
| static void | installFactory (CheckFunction checker, AllocationFunction allocator) | 
Protected Member Functions | |
| void | reportError (const char *message) override | 
| Reports an error (through the callback if possible).  More... | |
| void | reportWarning (const char *message) override | 
| Reports a warning (through the callback if possible).  More... | |
  Protected Member Functions inherited from COP_SlapcompManager | |
| void | reportAllErrorManagerErrors (const UT_ErrorManager &) | 
| Relays all warnings and messages from the error manager.  More... | |
Protected Attributes | |
| Callbacks | myCallbacks | 
| UT_UniquePtr< COP_SlapcompManager > | myManager | 
| int | myCurrentType = -1 | 
| int | myVersion = 0 | 
| bool | myStateChanged = false | 
This class is a polymorphic slapcomp manager that can be used to interface with different types of slapcomps. To this end, a factory must be registered with the static installFactory() method, with a checker and an allocator. When a manager gets enabled with a specific node, the first factory (i.e. one registered earliest) whose check the node passes will be used to run it.
Definition at line 19 of file COP_SlapcompDispatcher.h.
| using COP_SlapcompDispatcher::AllocationFunction = COP_SlapcompManager* (*)( | 
Should dynamically allocate a new slapcomp manager for the slapcomp type.
Definition at line 28 of file COP_SlapcompDispatcher.h.
Definition at line 22 of file COP_SlapcompDispatcher.h.
| using COP_SlapcompDispatcher::CheckFunction = bool (*)(const OP_Node*) | 
Should return true for nodes that are supported by the slapcomp type.
Definition at line 25 of file COP_SlapcompDispatcher.h.
      
  | 
  inline | 
Definition at line 49 of file COP_SlapcompDispatcher.h.
      
  | 
  delete | 
| COP_SlapcompDispatcher::COP_SlapcompDispatcher | ( | COP_SlapcompDispatcher && | ) | 
      
  | 
  overridevirtual | 
Prepares for applying slapcomp for inputs of the given types.
Implements COP_SlapcompManager.
| void COP_SlapcompDispatcher::copyFrom | ( | const COP_SlapcompDispatcher & | other, | 
| const OP_Context & | context | ||
| ) | 
Makes this object a copy of other, including the enable state.
      
  | 
  overridevirtual | 
Disable slapcomp.
Implements COP_SlapcompManager.
      
  | 
  overridevirtual | 
Enable slapcomp with the given node.
Implements COP_SlapcompManager.
      
  | 
  inline | 
Definition at line 60 of file COP_SlapcompDispatcher.h.
      
  | 
  overridevirtual | 
Returns a particular output by name.
Implements COP_SlapcompManager.
      
  | 
  overridevirtual | 
Should return the outputs that this slapcomp produces.
Implements COP_SlapcompManager.
      
  | 
  overridevirtual | 
Returns the id of the node slapcomp was built from.
Implements COP_SlapcompManager.
      
  | 
  inlineoverridevirtual | 
Returns a version number, which is incremented every time the program is rebuilt.
Implements COP_SlapcompManager.
Definition at line 83 of file COP_SlapcompDispatcher.h.
      
  | 
  overridevirtual | 
Returns true if the last run of slapcomp had errors.
Implements COP_SlapcompManager.
      
  | 
  inlineoverridevirtual | 
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.
Implements COP_SlapcompManager.
Definition at line 87 of file COP_SlapcompDispatcher.h.
      
  | 
  static | 
Call this function to register a slapcomp factory. The checker function should return true for a node if that slapcomp manager should be used for it.
      
  | 
  overridevirtual | 
Returns the on-off state of slapcomp.
Implements COP_SlapcompManager.
      
  | 
  overridevirtual | 
Returns true if the slapcomp program ouputs an AOV with the given name. Should accept "color" as an alias for the "C" AOV.
Implements COP_SlapcompManager.
      
  | 
  delete | 
| COP_SlapcompDispatcher& COP_SlapcompDispatcher::operator= | ( | COP_SlapcompDispatcher && | ) | 
      
  | 
  overrideprotectedvirtual | 
Reports an error (through the callback if possible).
Implements COP_SlapcompManager.
      
  | 
  overrideprotectedvirtual | 
Reports a warning (through the callback if possible).
Implements COP_SlapcompManager.
      
  | 
  overridevirtual | 
Should run slapcomp with the specified inputs and context.
Implements COP_SlapcompManager.
      
  | 
  overridevirtual | 
Sets a callback that gets called when reporting slapcomp errors.
Implements COP_SlapcompManager.
Sets a callback that gets called when slapcomp is run.
Implements COP_SlapcompManager.
Sets a callback that gets called when slapcomp changes.
Implements COP_SlapcompManager.
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.
Implements COP_SlapcompManager.
Definition at line 93 of file COP_SlapcompDispatcher.h.
      
  | 
  overridevirtual | 
Sets a callback that gets called when reporting slapcomp warnings.
Implements COP_SlapcompManager.
      
  | 
  protected | 
Definition at line 103 of file COP_SlapcompDispatcher.h.
      
  | 
  protected | 
Definition at line 105 of file COP_SlapcompDispatcher.h.
      
  | 
  protected | 
Definition at line 104 of file COP_SlapcompDispatcher.h.
      
  | 
  protected | 
Definition at line 108 of file COP_SlapcompDispatcher.h.
      
  | 
  protected | 
Definition at line 107 of file COP_SlapcompDispatcher.h.