1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Robert d9d237e0eb Node editor - Added node collection pin add/remove
Node editor - Added first static value node
2022-03-20 15:54:36 +01:00

64 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using Artemis.Core.Events;
namespace Artemis.Core
{
/// <summary>
/// Represents a collection of <see cref="IPin" />s on a <see cref="INode" />
/// </summary>
public interface IPinCollection : IEnumerable<IPin>
{
/// <summary>
/// Gets the node the pin collection belongs to
/// </summary>
INode Node { get; }
/// <summary>
/// Gets the name of the pin collection
/// </summary>
string Name { get; }
/// <summary>
/// Gets the direction of the pin collection and all its pins
/// </summary>
PinDirection Direction { get; }
/// <summary>
/// Gets the type of values the pin collection and all its pins holds
/// </summary>
Type Type { get; }
/// <summary>
/// Occurs when a pin was added to the collection
/// </summary>
event EventHandler<SingleValueEventArgs<IPin>> PinAdded;
/// <summary>
/// Occurs when a pin was removed from the collection
/// </summary>
event EventHandler<SingleValueEventArgs<IPin>> PinRemoved;
/// <summary>
/// Creates a new pin compatible with this collection
/// </summary>
/// <returns>The newly created pin</returns>
IPin CreatePin();
/// <summary>
/// Adds the provided <paramref name="pin" /> to the collection
/// </summary>
void Add(IPin pin);
/// <summary>
/// Removes the provided <paramref name="pin" /> from the collection
/// </summary>
/// <param name="pin">The pin to remove</param>
bool Remove(IPin pin);
/// <summary>
/// Resets the pin collection, causing its pins to re-evaluate the next time its value is requested
/// </summary>
void Reset();
}
}