SmartEngine  1.6.0
GraphComponent.h
1 // Copyright (C) Entropy Software LLC - All Rights Reserved
2 
3 #pragma once
4 
5 #include "Graph.h"
6 #include "GraphNode.h"
7 
8 namespace SmartEngine
9 {
10 
11 #pragma pack(push, 4)
12 struct GraphComponentCInfo : GraphNodeCInfo
16 {
20  IGraph* graph = nullptr;
21 
31  const char* outputNodeName = nullptr;
32 
43 
48 };
49 #pragma pack(pop)
50 
61 class SMARTENGINE_EXPORT IGraphComponent : public IGraphNode
62 {
63 public:
64  SMARTENGINE_DECLARE_CLASS(IGraphComponent)
65 
66 
67  virtual ObjectPtr<IGraph> GetGraph() const = 0;
70 };
71 
76 
78 extern "C"
79 {
80  SMARTENGINE_EXPORT ObjPtr GraphComponent_CreateInstance(const GraphComponentCInfo& cinfo);
81  SMARTENGINE_EXPORT ObjPtr GraphComponent_GetGraph(ObjPtr object);
82 }
84 
85 } // namespace SmartEngine
SmartEngine::IGraphNode
A logical node in the AI graph. Some nodes, like NeuralNetwork, are composed of other nodes (neuron l...
Definition: GraphNode.h:34
SmartEngine::GraphComponentCInfo::componentInputBindingCount
int componentInputBindingCount
The number of supplied component input bindings.
Definition: GraphComponent.h:47
SmartEngine::GraphComponentCInfo::componentInputBindings
const ComponentInputBinding * componentInputBindings
Array of bindings mapping nodes in this graph to the inputs of the component graph....
Definition: GraphComponent.h:42
SmartEngine::GraphComponentCInfo::outputNodeName
const char * outputNodeName
The name of the output node in the graph that will be used when treating this component as a graph no...
Definition: GraphComponent.h:31
SmartEngine::GraphComponentCInfo::graph
IGraph * graph
The graph this component embeds
Definition: GraphComponent.h:20
SmartEngine::ObjectPtr
Smart pointer to an IObject. Automatic ref counting.
Definition: ObjectPtr.h:16
SmartEngine
Definition: A2CTrainer.h:10
SmartEngine::IGraphComponent
A graph component allows graphs to embed other graphs. Nodes within components can be referenced usin...
Definition: GraphComponent.h:62
SmartEngine::IGraph
A graph is a collection of buffers and nodes that together form a neural network. The graph is create...
Definition: Graph.h:61
SmartEngine::GraphComponentCInfo
Data used to construct an IGraphComponent instance
Definition: GraphComponent.h:16
SmartEngine::CreateGraphComponent
SMARTENGINE_EXPORT ObjectPtr< IGraphComponent > CreateGraphComponent(const GraphComponentCInfo &cinfo)
Creates an instance of IGraphComponent
SmartEngine::ComponentInputBinding
Dynamically binds a node to a component input.
Definition: Graph.h:35