bracket system

This commit is contained in:
h z
2024-07-29 17:24:31 +01:00
parent 5fbbbe83a1
commit bae0a52e3f
36 changed files with 258 additions and 36 deletions

View File

@@ -10,7 +10,12 @@ namespace Nocturnis.DataStructures;
public class DataCache : CacheItem<DataVariable>
{
public new static DataCache Null => new (x => (null, DataTypeConstant.BaseDataTypes.Null));
public DataCache(Func<CacheItem, DataVariable> rec) : base(rec) => throw new Exception("CONSTRUCTION NOT ALLOWED");
public DataCache(Func<CacheItem, DataVariable> rec)
{
Value = new DataVariable();
ProxyCalculator = c => (rec(c).Data, rec(c).Type);
}
public DataCache(Func<CacheItem, (object, DataType)> rec)
{