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 
18 #include <UT/UT_Array.h>
19 
20 class UT_AutoJSONParser;
21 class UT_JSONValue;
22 class UT_JSONValueArray;
23 
24 class UT_StringHolder;
25 class UT_WorkBuffer;
26 
28 {
29 public:
31 
32 public:
33  static bool parseTemplate(
34  PDG_NodeInterface& interface,
35  const UT_StringHolder& template_name,
36  const UT_StringHolder& template_path,
37  const UT_StringHolder& template_body,
38  UT_WorkBuffer& errors);
39  static bool parseFile(
40  Array& template_list,
41  const UT_StringHolder& file_name,
42  UT_WorkBuffer& errors);
43  static bool parseString(
44  Array& template_list,
45  const UT_StringHolder& json_string,
46  UT_WorkBuffer& errors);
47  static bool parseJson(
48  Array& template_list,
49  UT_AutoJSONParser& parser,
50  UT_WorkBuffer& errors);
51 
52 private:
53  static bool parseInterface(
54  const UT_JSONValue& value,
55  PDG_NodeInterface& interface,
56  UT_WorkBuffer& errors);
57 
58  static bool parseScript(
59  const UT_JSONValue& value,
60  PDG_NodeInterface& interface,
61  UT_WorkBuffer& errors);
62 
63  static bool parsePorts(
64  const UT_JSONValue& value,
65  PDG_NodeInterface& interface,
66  PDG_PortType port_type,
67  UT_WorkBuffer& errors);
68 
69  static bool parseVars(
70  const UT_JSONValueArray& value,
72  UT_WorkBuffer& errors);
73 
74  static bool parseDependencies(
75  const UT_JSONValue& value,
76  PDG_NodeInterface& interface,
77  UT_WorkBuffer& errors);
78 };
79 
80 #endif
UT_JSONValueArray stores a list of UT_JSONValue objects.
#define PDG_API
Definition: PDG_API.h:23
Class to store JSON objects as C++ objects.
Definition: UT_JSONValue.h:99
Definition: core.h:1131
PDG_PortType
Enumeration of node port types.