HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_NodeTemplate.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:
7  */
8 
9 #ifndef __PDG_NODE_TEMPLATE_H__
10 #define __PDG_NODE_TEMPLATE_H__
11 
12 #include "PDG_API.h"
13 
14 #include "PDG_AttributeInfo.h"
15 #include "PDG_NodeInterface.h"
16 #include "PDG_Port.h"
17 #include "PDG_Types.h"
18 
19 #include <UT/UT_Array.h>
20 
21 class UT_AutoJSONParser;
22 class UT_JSONValue;
23 class UT_JSONValueArray;
24 
25 class UT_StringHolder;
26 class UT_WorkBuffer;
27 
29 {
30 public:
32 
33 public:
34  static bool parseTemplate(
35  PDG_NodeInterface& interface,
36  const UT_StringHolder& template_name,
37  const UT_StringHolder& template_path,
38  const UT_StringHolder& template_body,
39  UT_WorkBuffer& errors);
40  static bool parseFile(
41  Array& template_list,
42  const UT_StringHolder& file_name,
43  UT_WorkBuffer& errors);
44  static bool parseString(
45  Array& template_list,
46  const UT_StringHolder& json_string,
47  UT_WorkBuffer& errors);
48  static bool parseJson(
49  Array& template_list,
50  UT_AutoJSONParser& parser,
51  UT_WorkBuffer& errors);
52 
53 private:
54  static bool parseInterface(
55  const UT_JSONValue& value,
56  PDG_NodeInterface& interface,
57  UT_WorkBuffer& errors);
58 
59  static bool parseScript(
60  const UT_JSONValue& value,
61  PDG_NodeInterface& interface,
62  UT_WorkBuffer& errors);
63 
64  static bool parsePorts(
65  const UT_JSONValue& value,
66  PDG_NodeInterface& interface,
67  PDG_PortType port_type,
68  UT_WorkBuffer& errors);
69 
70  static bool parseVars(
71  const UT_JSONValueArray& value,
73  UT_WorkBuffer& errors);
74 
75  static bool parseDependencies(
76  const UT_JSONValue& value,
77  PDG_NodeInterface& interface,
78  UT_WorkBuffer& errors);
79 };
80 
81 #endif
UT_JSONValueArray stores a list of UT_JSONValue objects.
#define PDG_API
Definition: PDG_API.h:23
PDG_PortType
Enumeration of node port types.
Definition: PDG_Types.h:347
Class to store JSON objects as C++ objects.
Definition: UT_JSONValue.h:99
Definition: core.h:1131