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 <UT/UT_String.h>
17 
18 class OP_ConnectorId;
19 class OP_Node;
20 
22 {
23 public:
25 
26  static int nameToIndex(const OP_ConnectorId &id,
27  OP_Node *node);
28  static void inputIndexToName(int index,
29  OP_Node *node,
30  OP_ConnectorId &id_out,
31  bool create_if_needed = false);
32 
33  static int outputNameToIndex(const OP_ConnectorId &id,
34  OP_Node *node);
35  static void outputIndexToName(int index,
36  OP_Node *node,
37  OP_ConnectorId &id_out);
38 
39  static void convertOutputIdToOutputName(
40  const OP_ConnectorId &output_id,
41  OP_Node *node,
42  UT_String &output_name_out);
43  static void convertOutputNameToOutputId(const char *output_name,
44  OP_Node *node,
45  OP_ConnectorId &id_out);
46  static void convertInputNameToInputId(const char *input_name,
47  OP_Node *node,
48  OP_ConnectorId &id_out);
49 
50 private:
51  // Does not construct.
52  OP_IndexConverter() { }
53 };
54 
55 #endif
#define OP_API
Definition: OP_API.h:10
GLuint index
Definition: glcorearb.h:786