HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP_SlapcompInputFetcher.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  */
7 
8 #pragma once
9 
10 #include "COP_API.h"
11 
12 #include <IMX/IMX_Layer.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_NonCopyable.h>
15 
16 class COP_CableStructure;
17 
18 /// Interface for getting IMX_Layer inputs for a slapcomp program on demand.
20 {
21 public:
23 
24  /// Gets the desired IMX_Layer. If the given layer name is C and no such
25  /// layer exists, this method will also check for a color layer.
27  {
28  using namespace UT::Literal;
29  IMX_LayerConstPtr layer = getLayerInternal(layer_name);
30  if (!layer && layer_name == "C"_sh)
31  layer = getLayerInternal("color"_sh);
32  return layer;
33  }
34 
35  /// Returns types and names of all inputs available to this fetcher.
36  virtual COP_CableStructure getLayerStructure() const = 0;
37 
38 protected:
39  /// Implementation for getLayer.
40  /// Does not need to worry about aliasing the layer name C to color.
41  virtual IMX_LayerConstPtr getLayerInternal(
42  const UT_StringHolder& layer_name) = 0;
43 };
44 
IMX_LayerConstPtr getLayer(const UT_StringHolder &layer_name)
GLenum GLuint GLint GLint layer
Definition: glcorearb.h:1299
UT_SharedPtr< const IMX_Layer > IMX_LayerConstPtr
Definition: IMX_Layer.h:27
Interface for getting IMX_Layer inputs for a slapcomp program on demand.
#define COP_API
Definition: COP_API.h:8