blob: 96ee4ede98937dd299c458e7aa3c2a1dfb792e8a (
plain)
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
|
using RealTimeGraphX.EventArguments;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RealTimeGraphX
{
/// <summary>
/// Represents a graph component which can receive data from another type of component.
/// </summary>
/// <typeparam name="TIn">The type of the in.</typeparam>
/// <seealso cref="RealTimeGraphX.IGraphComponent" />
public interface IGraphInputComponent<TIn> : IGraphComponent where TIn : IGraphComponent
{
/// <summary>
/// Occurs when the <see cref="Input"/> property has changed.
/// </summary>
event EventHandler<InputChangedEventArgs<TIn>> InputChanged;
/// <summary>
/// Gets the connected input <see cref="IGraphComponent"/>.
/// </summary>
TIn Input { get; }
/// <summary>
/// Connects the specified component output to this component input.
/// </summary>
/// <param name="component">The component.</param>
/// <param name="fromInput">Specifies whether this call was made from a <see cref="TIn"/> component.</param>
void ConnectInput(TIn component, bool fromInput = false);
/// <summary>
/// Disconnects this component input from the current connected <see cref="Input"/> <see cref="IGraphComponent"/>.
/// </summary>
/// <param name="fromInput">Specifies whether this call was made from a <see cref="TIn"/> component.</param>
void DisconnectInput(bool fromInput = false);
}
}
|