Show / Hide Table of Contents

Class Node

Major building block of the Xirkit library. Each Circuit contains Node instances.

A single object instance of any type can be hosted inside a node. This way any arbitrary object can participate in a Circuit. Node instances within a Circuit are interconnected using in-pins and out-pins. The internal connection from pins to actual members (properties and fields) of the contained object are done using IMemberAccessor<T>s.

Inheritance
System.Object
Node
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Xirkit
Assembly: Fusee.Xirkit.dll
Syntax
public class Node

Constructors

Node(Object)

Constructs a new node.

Declaration
public Node(object o)
Parameters
Type Name Description
System.Object o

The object to be hosted.

Properties

AllPinsActual

Gets a value indicating whether all in-pins have been updated actual since the last call to Reset().

Declaration
public bool AllPinsActual { get; }
Property Value
Type Description
System.Boolean

true if all pins are actual; otherwise, false.

InPins

Gets the in pins.

Declaration
public IEnumerable<IInPin> InPins { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IInPin>

The in pins.

O

Gets and sets the object to host by this node.

Declaration
public object O { get; set; }
Property Value
Type Description
System.Object

The object to be hosted.

OutPins

Gets the out pins.

Declaration
public IEnumerable<IOutPin> OutPins { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IOutPin>

The out pins.

Methods

Attach(String, Node, String)

Attaches this Node's object's member (specified by thisMember) as outgoing pin to the specified member of the object hosted by the other node. A member can be any field or property.

Declaration
public void Attach(string thisMemberOut, Node other, string otherMemberIn)
Parameters
Type Name Description
System.String thisMemberOut

The member of this node emitting values.

Node other

The other node.

System.String otherMemberIn

The other node's object's member receiving values.

Remarks

This is a high-level method users can call to do the wiring inside a Circuit. It creates all the necessary in- and out-pins together with their respective member accessors.

Propagate()

Propagates the values at the object's members' to all in-pins connected to each out-pin connected to a member of this Node's hosted object.

Declaration
public void Propagate()

RemoveAllPins()

Removes all pins.

Declaration
public void RemoveAllPins()

Reset()

Resets this instance by considering all in-pins to contain "dirty" values.

Declaration
public void Reset()
Remarks

Keeping a dirty/actual state on the in-pins is necessary if the node hosts an instance of ICalculationPerformer. In this case the calculation should only be performed once in an execution step and not each time an in-pin changes its value.

Generated by DocFX
GitHub Repo
Back to top