Class ProviderNode
Base node for any node that provides (gives) data. In other words, any node that has one more out ports.
Inheritance
object
ProviderNode
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: InsaneScatterbrain.ScriptGraph
Syntax
[Serializable]
public abstract class ProviderNode : ScriptNode, IProviderNode, IScriptNode, INode
Constructors
ProviderNode()
Declaration
protected ProviderNode()
ProviderNode(ScriptGraphGraph)
Declaration
[Obsolete("Processor nodes needn't be dependant on a graph anymore. You can use the parameterless constructor instead. This one will be removed with version 2.0.")]
protected ProviderNode(ScriptGraphGraph graph)
Parameters
Type | Name | Description |
---|---|---|
ScriptGraphGraph | graph |
Properties
Node
In case of proxy classes (such as ProcessorNode uses) it's useful to explicitly set the node's type.
Declaration
protected virtual IProviderNode Node { get; }
Property Value
Type | Description |
---|---|
IProviderNode |
OutPorts
Declaration
public ReadOnlyCollection<OutPort> OutPorts { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<T><OutPort> |
Methods
AddOut(string, Type, IScriptNode, OutPort)
Adds an out port with the given name of the given type.
Declaration
public OutPort AddOut(string name, Type type, IScriptNode owner = null, OutPort port = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The port's name. |
System.Type | type | The port's data type. |
IScriptNode | owner | The node that is marked as the owner. If this is null that will be this node (which is probably what you want). |
OutPort | port | The existing port. |
Returns
Type | Description |
---|---|
OutPort | The new out port. |
AddOut<T>(string, IScriptNode)
Declaration
public OutPort AddOut<T>(string name, IScriptNode owner = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
IScriptNode | owner |
Returns
Type | Description |
---|---|
OutPort |
Type Parameters
Name | Description |
---|---|
T |
ClearPorts()
Declaration
public void ClearPorts()
GetOutPort(string)
Declaration
public OutPort GetOutPort(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
OutPort |
MoveOut(int, int)
Declaration
public void MoveOut(int oldIndex, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
int | oldIndex | |
int | newIndex |
OnLoadOutputPorts()
Declaration
public virtual void OnLoadOutputPorts()
RemoveOut(string)
Declaration
public void RemoveOut(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
RenameOut(string, string)
Declaration
public void RenameOut(string oldName, string newName)
Parameters
Type | Name | Description |
---|---|---|
string | oldName | |
string | newName |
Events
OnOutPortAdded
Declaration
public event Action<OutPort> OnOutPortAdded
Event Type
Type | Description |
---|---|
System.Action<T><OutPort> |
OnOutPortMoved
Declaration
public event Action<OutPort, int> OnOutPortMoved
Event Type
Type | Description |
---|---|
System.Action<T1, T2><OutPort, int> |
OnOutPortRemoved
Declaration
public event Action<OutPort> OnOutPortRemoved
Event Type
Type | Description |
---|---|
System.Action<T><OutPort> |
OnOutPortRenamed
Declaration
public event Action<OutPort, string, string> OnOutPortRenamed
Event Type
Type | Description |
---|---|
System.Action<T1, T2, T3><OutPort, string, string> |