source generator

This commit is contained in:
h z
2024-07-10 07:02:11 +01:00
parent e1a74ad614
commit 5c6e3031d5
35 changed files with 169 additions and 34 deletions

View File

@@ -1,11 +1,14 @@
using Nocturnis.Enigmos.Cables;
using Nocturnis.Enigmos.Ports;
using Nocturnis.UIElements;
using Nocturnis.UIElements.Layers;
namespace Nocturnis.Enigmos.Boards;
public interface IBaseBoard
{
IPanelViewer? PanelViewer { get; set; }
IEnumerable<IBasePort> OnBoardPorts { get; }
IBasePort? ConnectPending { get; set; }
Dictionary<IBasePort, IBaseCable> CablePairing { get; set; }
void AddCable(IBaseCable cable);
@@ -15,4 +18,6 @@ public interface IBaseBoard
IModuleManualLayer? ModuleManualLayer { get; set; }
IModuleMovingLayer? ModuleMovingLayer { get; set; }
void Reset();
void SetCableVisualMode(bool mode);
void SetLabelVisualMode(bool mode);
}

View File

@@ -0,0 +1,8 @@
using Nocturnis.Enigmos.Modules;
namespace Nocturnis.Enigmos.Boards;
public interface IPrimaryBoard : IBaseBoard
{
IEngineModule Engine { get; set; }
}

View File

@@ -1,6 +1,6 @@
namespace Nocturnis.Enigmos.ModuleManuals;
public interface IModuleManualTab
public interface IModuleManualTab : INodeInterface
{
string FullName();
}

View File

@@ -7,6 +7,7 @@ namespace Nocturnis.Enigmos.Modules;
public interface IBaseModule
{
Texture2D? PreviewTexture { get; }
IEnumerable<IBasePort> Ports { get; }
IBaseBoard? Board { get; set; }
Vector2 PositionToBoard { get; }
@@ -14,7 +15,7 @@ public interface IBaseModule
double MaintenanceAlpha { get; }
double MaintenanceBeta { get; }
string GetDescription { get; }
ISimpleLabel? Label { get; }
Label? Label { get; }
Node AsNode { get; }
Vector2 Position { get; set; }
string LabelString { get; set; }

View File

@@ -1,6 +1,6 @@
namespace Nocturnis.Enigmos.Modules;
public interface ICompositeModule
public interface ICompositeModule : IBaseModule
{
IBaseModule[] SubModules { get; }
}

View File

@@ -1,8 +0,0 @@
using Godot;
namespace Nocturnis.Enigmos.Modules;
public interface IComputationalCompositeModule : ICompositeModule
{
Vector2 PositionToBoard { get; }
}

View File

@@ -0,0 +1,6 @@
namespace Nocturnis.Enigmos.Modules;
public interface IEngineModule : ITerminalModule
{
}

View File

@@ -0,0 +1,9 @@
using Nocturnis.DataStructures;
namespace Nocturnis.Enigmos.Modules;
public interface IEnumerableProcessingModule : ICompositeModule
{
IData[] CachedInputArray { get; set; }
int ProcessingIndex { get; set; }
}

View File

@@ -0,0 +1,11 @@
using Nocturnis.DataStructures;
namespace Nocturnis.Enigmos.Modules;
public interface IInternalComputationalModule : ICompositeModule
{
IData? CachedResult { get; set; }
void Compute();
bool ComputationFinished { get; set; }
bool ComputationStarted { get; set; }
}

View File

@@ -5,7 +5,7 @@ namespace Nocturnis.Enigmos.Modules;
public interface IOptimizationModule : IProgrammableModule
{
IData CachedResult { get; set; }
bool OptimizationStarted { get; set; }
bool OptimizationFinished { get; set; }
bool ComputationStarted { get; set; }
bool ComputationFinished { get; set; }
void Optimize();
}

View File

@@ -1,5 +1,5 @@
namespace Nocturnis.Enigmos.Modules;
public interface IProgrammableModule : IBaseModule
public interface IProgrammableModule : ICompositeModule
{
}

View File

@@ -3,5 +3,6 @@ namespace Nocturnis.Enigmos.Modules;
public interface ITerminalModule : IParameterModule
{
void Drain();
bool Finished { get; set; }
}

View File

@@ -1,5 +1,4 @@
using Nocturnis.DataStructures;
using Skeleton.DataStructure;
namespace Nocturnis.Enigmos.Ports.DataPorts.Directions;

View File

@@ -1,7 +1,5 @@
using Nocturnis.DataStructures;
using Nocturnis.Enigmos.Modules;
using Nocturnis.Enigmos.Modules.ComputationalModules;
using Skeleton.DataStructure;
namespace Nocturnis.Enigmos.Ports.DataPorts.Directions;

View File

@@ -6,6 +6,7 @@ namespace Nocturnis.Enigmos.Ports;
public interface IBasePort
{
Vector2 PositionToBoard { get; }
bool Connected { get; }
IBaseModule? Module { get; set; }
bool IsMatch(IBasePort oth);