HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_IndexConverter.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 * NAME: OP_IndexConverter.h
7 *
8 * COMMENTS:
9 *
10 */
11 
12 #ifndef __OP_IndexConverter_h__
13 #define __OP_IndexConverter_h__
14 
15 #include "OP_API.h"
16 #include "OP_DataTypes.h"
17 #include <UT/UT_Optional.h>
18 #include <UT/UT_String.h>
19 
20 class OP_ConnectorId;
21 class OP_Node;
22 
24 {
25 public:
27 
28  static OP_InputIdx nameToIndex(const OP_ConnectorId &id,
29  OP_Node *node);
30  static void inputIndexToName(OP_InputIdx index,
31  OP_Node *node,
32  OP_ConnectorId &id_out,
33  bool create_if_needed = false);
34 
36  outputNameToIndex(const OP_ConnectorId &id,
37  OP_Node *node);
38  static void outputIndexToName(OP_OutputIdx index,
39  OP_Node *node,
40  OP_ConnectorId &id_out);
41 
42  static void convertOutputIdToOutputName(
43  const OP_ConnectorId &output_id,
44  OP_Node *node,
45  UT_String &output_name_out);
46  static void convertOutputNameToOutputId(const char *output_name,
47  OP_Node *node,
48  OP_ConnectorId &id_out);
49  static void convertInputNameToInputId(const char *input_name,
50  OP_Node *node,
51  OP_ConnectorId &id_out);
52 
53 private:
54  // Does not construct.
55  OP_IndexConverter() { }
56 };
57 
58 #endif
int OP_InputIdx
Definition: OP_DataTypes.h:184
std::optional< T > UT_Optional
Definition: UT_Optional.h:26
#define OP_API
Definition: OP_API.h:10
GLuint index
Definition: glcorearb.h:786
int OP_OutputIdx
Definition: OP_DataTypes.h:185