2019-08-23 11:56:54 -07:00
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
[AlwaysInclude]
|
|
|
|
struct SizedArray<T, CSize> where CSize : const int
|
|
|
|
{
|
2020-08-23 05:42:42 -07:00
|
|
|
protected T[CSize] mVal;
|
2019-08-23 11:56:54 -07:00
|
|
|
|
|
|
|
public int Count
|
|
|
|
{
|
|
|
|
[Inline]
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return CSize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public explicit static operator T[CSize] (Self val)
|
|
|
|
{
|
|
|
|
return val.mVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void ToString(String strBuffer) mut
|
|
|
|
{
|
|
|
|
if (typeof(T) == typeof(char8))
|
|
|
|
{
|
|
|
|
strBuffer.Append((char8*)&mVal, CSize);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
strBuffer.Append('(');
|
|
|
|
for (int i < CSize)
|
|
|
|
{
|
|
|
|
if (i != 0)
|
|
|
|
strBuffer.Append(", ");
|
|
|
|
mVal[i].ToString(strBuffer);
|
|
|
|
}
|
|
|
|
strBuffer.Append(')');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|