private void WriteNodeV3(Node node) { var nodeInfo = new NodeEntryV3(); if (node.Parent == null) { nodeInfo.ParentIndex = -1; } else { nodeInfo.ParentIndex = NodeIndices[node.Parent]; } nodeInfo.NameHashTableIndex = AddStaticString(node.Name); if (node.Attributes.Count > 0) { nodeInfo.FirstAttributeIndex = NextAttributeIndex; WriteNodeAttributes(node); } else { nodeInfo.FirstAttributeIndex = -1; } // FIXME! throw new Exception("Writing uncompressed LSFv3 is not supported yet"); nodeInfo.NextSiblingIndex = -1; BinUtils.WriteStruct <NodeEntryV3>(NodeWriter, ref nodeInfo); NodeIndices[node] = NextNodeIndex; NextNodeIndex++; WriteNodeChildren(node); }
private void WriteNodeV3(Node node) { var nodeInfo = new NodeEntryV3(); if (node.Parent == null) { nodeInfo.ParentIndex = -1; } else { nodeInfo.ParentIndex = NodeIndices[node.Parent]; } nodeInfo.NameHashTableIndex = AddStaticString(node.Name); if (node.Attributes.Count > 0) { nodeInfo.FirstAttributeIndex = NextAttributeIndex; WriteNodeAttributesV3(node); } else { nodeInfo.FirstAttributeIndex = -1; } // FIXME! throw new Exception("Writing uncompressed LSFv3 is not supported yet"); nodeInfo.NextSiblingIndex = -1; BinUtils.WriteStruct<NodeEntryV3>(NodeWriter, ref nodeInfo); NodeIndices[node] = NextNodeIndex; NextNodeIndex++; WriteNodeChildren(node); }