-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathGraphSyntax.h
More file actions
45 lines (37 loc) · 1.45 KB
/
GraphSyntax.h
File metadata and controls
45 lines (37 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Distributed under the MIT License (See
// accompanying file "LICENSE" or the website
// http://www.opensource.org/licenses/mit-license.php)
#pragma once
#include "ShaderPatcher.h"
#include "NodeGraph.h"
#include "NodeGraphProvider.h"
#include "../Utility/StringUtils.h"
#include <vector>
#include <string>
#include <unordered_map>
namespace Assets { class DirectorySearchRules; }
namespace GraphLanguage
{
class GraphSyntaxFile
{
public:
class SubGraph
{
public:
NodeGraphSignature _signature;
NodeGraph _graph;
};
std::unordered_map<std::string, SubGraph> _subGraphs;
std::unordered_map<std::string, std::string> _imports;
std::unordered_map<std::string, AttributeTable> _attributeTables;
};
GraphSyntaxFile ParseGraphSyntax(StringSection<char> sourceCode);
std::ostream& Serialize(std::ostream& str, const GraphSyntaxFile& graphSyntaxFile);
std::shared_ptr<INodeGraphProvider> MakeGraphSyntaxProvider(
const std::shared_ptr<GraphSyntaxFile>& parsedGraphFile,
const ::Assets::DirectorySearchRules& searchRules,
const ::Assets::DepValPtr& dependencyValidation);
INodeGraphProvider::NodeGraph LoadGraphSyntaxFile(StringSection<> filename, StringSection<> entryPoint);
std::string GenerateGraphSyntax(const NodeGraph& graph, const NodeGraphSignature& interf, StringSection<> name);
std::string GenerateSignature(const NodeGraphSignature& sig, StringSection<char> name, bool useReturnType = true, bool includeTemplateParameters = false);
}