Esempio n. 1
0
            public void FromXmlInitialize(XmbFileBuilder builder, int rootIndex, int index, XmlElement e)
            {
                this.Index            = index;
                this.RootElementIndex = rootIndex;

                if (e.HasAttributes)
                {
                    Attributes = new List <KeyValuePair <XmbVariant, XmbVariant> >(e.Attributes.Count);
                }
                if (e.HasChildNodes)
                {
                    ChildrenIndices = new List <int>(e.ChildNodes.Count);
                }

                string name = e.Name;
                string text = e.Value;

                if (e.HasAttributes)
                {
                    FromXmlProcessAttributes(builder, e);
                }
                if (e.HasChildNodes)
                {
                    FromXmlProcessChildren(builder, e);
                }
            }
        uint Add(XmbFileBuilder builder, PoolEntry e)
        {
            uint size = e.CalculateSize();

            uint offset = mPoolSize += size;

            // In case the entry needs to be aligned
            mPoolSize += e.CalculatePadding(offset);

            mEntries.Add(offset, e);
            return(offset);
        }
        public uint Add(XmbFileBuilder builder, int v)
        {
            foreach (var kv in mEntries)
            {
                if (kv.Value.Equals(v))
                {
                    return(kv.Key);
                }
            }

            var entry = PoolEntry.New(v);

            return(Add(builder, entry));
        }
        public uint Add(XmbFileBuilder builder, string v, bool isUnicode = false)
        {
            foreach (var kv in mEntries)
            {
                if (kv.Value.Equals(v))
                {
                    return(kv.Key);
                }
            }

            var entry = PoolEntry.New(v);

            entry.IsUnicode = isUnicode;
            return(Add(builder, entry));
        }
Esempio n. 5
0
 public void FromXmlProcessAttributes(XmbFileBuilder builder, XmlElement e)
 {
 }
Esempio n. 6
0
 public void FromXmlProcessChildren(XmbFileBuilder builder, XmlElement e)
 {
 }