private AttributePSVIInfo AddAttributePSVI(int attIndex)
{
Debug.Assert(attIndex <= _attributePSVINodes.Length);
AttributePSVIInfo attInfo = _attributePSVINodes[attIndex];
if (attInfo != null)
{
attInfo.Reset();
return attInfo;
}
if (attIndex >= _attributePSVINodes.Length - 1)
{ //reached capacity of PSVIInfo array, Need to increase capacity to twice the initial
AttributePSVIInfo[] newPSVINodes = new AttributePSVIInfo[_attributePSVINodes.Length * 2];
Array.Copy(_attributePSVINodes, 0, newPSVINodes, 0, _attributePSVINodes.Length);
_attributePSVINodes = newPSVINodes;
}
attInfo = _attributePSVINodes[attIndex];
if (attInfo == null)
{
attInfo = new AttributePSVIInfo();
_attributePSVINodes[attIndex] = attInfo;
}
return attInfo;
}