HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP_SlapcompRegistry.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS: Global registry of the last slapcomps.
7  *
8  */
9 
10 #pragma once
11 
12 #include "COP_API.h"
13 
14 #include "COP_Signature.h"
15 
16 #include <IMX/IMX_Layer.h>
17 #include <UT/UT_Lock.h>
18 
19 ///
20 /// Stores slap comp layers for other nodes to possibly retrieve
21 /// Currently only one path, ideally will allow multiple viewport
22 /// simultaneously.
23 ///
25 {
26 public:
27  class AovInfo
28  {
29  public:
32  };
33 
34  static IMX_LayerConstPtr fetchLayer(const char *aov);
35  static void stashLayer(const UT_StringHolder &aov,
37 
38  static void registerNode(const OP_Node *node,
39  const UT_StringSet &aovs);
40  static void deregisterNode(const OP_Node *node);
41  static void notifyNodes();
42 
43  static void registerViewerAOVs(const UT_Array<AovInfo> &aovs);
44 
45  /// Populate aovs with all aovs requested by any live
46  /// import.
47  static void activeAOVs(UT_StringSet &aovs);
48 
49  /// List of AOVs last submitted by a viewer
50  /// import.
51  static void viewerAOVs(UT_Array<AovInfo> &aovs);
52 
53  static void clear();
54 
55 protected:
56  static COP_SlapcompRegistry *getRegistry();
57 
58  IMX_LayerConstPtr _fetchLayer(const char *aov);
59  void _stashLayer(const UT_StringHolder &aov,
61  void _clear();
62  void _registerNode(const OP_Node *node,
63  const UT_StringSet &aovs);
64  void _deregisterNode(const OP_Node *node);
65  void _notifyNodes();
66 
67  void _registerViewerAOVs(const UT_Array<AovInfo> &aovs);
68  void _activeAOVs(UT_StringSet &aovs);
69  void _viewerAOVs(UT_Array<AovInfo> &aovs);
70 
75  exint myVersion = 0;
76  exint myNotifyVersion = 0;
77 };
78 
79 
Unsorted map container.
Definition: UT_Map.h:107
int64 exint
Definition: SYS_Types.h:125
GLenum GLuint GLint GLint layer
Definition: glcorearb.h:1299
UT_Map< int, UT_SharedPtr< UT_StringSet > > myOpNodes
UT_SharedPtr< const IMX_Layer > IMX_LayerConstPtr
Definition: IMX_Layer.h:366
UT_Array< AovInfo > myViewerAOVs
COP_Type
Types of basic data that are passed around a COP network.
Definition: COP_Signature.h:16
UT_StringMap< IMX_LayerConstPtr > myLayers
#define COP_API
Definition: COP_API.h:8
type
Definition: core.h:1059