daily update on 20230320 by nitload youmu
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
public class ContainerNode<T> where T : INode
|
||||
public interface INode<T> where T : INode<T>
|
||||
{
|
||||
internal readonly T _this;
|
||||
internal ContainerNode<T> ID { get; }
|
||||
|
||||
internal void setID<T>(ContainerNode<T> id) where T : INode<T>;
|
||||
}
|
||||
|
||||
|
||||
public class ContainerNode<T> where T : INode<T>
|
||||
{
|
||||
internal readonly T _value;
|
||||
internal ContainerNode<T> _previous;
|
||||
internal ContainerNode<T> _next;
|
||||
internal ContainerNode<T> _side;
|
||||
|
||||
|
||||
public ContainerNode(T t)
|
||||
{
|
||||
_value = t;
|
||||
t.setID<T>(this);
|
||||
}
|
||||
|
||||
public virtual ContainerNode<T> Previous
|
||||
{
|
||||
@@ -33,13 +46,8 @@ namespace StgSharp
|
||||
|
||||
public T Value
|
||||
{
|
||||
get { return _this; }
|
||||
get { return _value; }
|
||||
}
|
||||
|
||||
public ContainerNode(T t)
|
||||
{
|
||||
_this = t;
|
||||
t.setID<T>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user