Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }