Example #1
0
        public static void Init()
        {
            CVSReader.Uninit();
            if (CVSReader._seqIndex == null)
            {
                CVSReader._seqIndex = new Dictionary <uint, CVSReader.SeqCache>();
            }
            CVSReader.InitBuff <float>(ref CVSReader.floatBuffer, ref CVSReader.floatIndex, 4f, 0f);
            CVSReader.InitBuff <uint>(ref CVSReader.uintBuffer, ref CVSReader.uintIndex, 16f, 0u);
            CVSReader.InitBuff <int>(ref CVSReader.intBuffer, ref CVSReader.intIndex, 2f, 0);
            CVSReader.InitBuff <long>(ref CVSReader.longBuffer, ref CVSReader.longIndex, 1f, 0L);
            CVSReader.InitBuff <double>(ref CVSReader.doubleBuffer, ref CVSReader.doubleIndex, 0.1f, 0.0);
            CVSReader.InitBuff <string>(ref CVSReader.stringBuffer, ref CVSReader.stringIndex, 1f, "");
            CVSReader.indexIndex  = 0;
            CVSReader.indexBuffer = new int[524288];
            int i   = 0;
            int num = CVSReader.indexBuffer.Length;

            while (i < num)
            {
                CVSReader.indexBuffer[i] = 0;
                i++;
            }
            CVSReader.indexBuffer[CVSReader.indexIndex++] = 0;
        }
Example #2
0
        public void AddTask(string location, CVSReader reader)
        {
            XFileReadAsync xFileReadAsync = new XFileReadAsync();

            xFileReadAsync.Location = location;
            xFileReadAsync.Reader   = reader;
            this._task_list.Add(xFileReadAsync);
        }
Example #3
0
            public override int ReadBuffer(BinaryReader stream)
            {
                CVSReader.ReAllocBuff <float>(ref CVSReader.floatBuffer, CVSReader.floatIndex);
                float num = stream.ReadSingle();

                CVSReader.floatBuffer[CVSReader.floatIndex] = num;
                return(CVSReader.floatIndex++);
            }
Example #4
0
 public override int ParseBuffer(string Field)
 {
     if (Field.Length == 0)
     {
         return(0);
     }
     CVSReader.ReAllocBuff <int>(ref CVSReader.intBuffer, CVSReader.intIndex);
     CVSReader.intBuffer[CVSReader.intIndex] = int.Parse(Field);
     return(CVSReader.intIndex++);
 }
Example #5
0
            public override int ParseBuffer(string Field)
            {
                if (Field.Length == 0)
                {
                    return(0);
                }
                string text = CVSReader.LookupInterString(XSingleton <XCommon> .singleton.XHash(Field), Field);

                CVSReader.ReAllocBuff <string>(ref CVSReader.stringBuffer, CVSReader.stringIndex);
                CVSReader.stringBuffer[CVSReader.stringIndex] = text;
                return(CVSReader.stringIndex++);
            }
Example #6
0
 public void ParseString(string Field, ref string value)
 {
     value = CVSReader.LookupInterString(XSingleton <XCommon> .singleton.XHash(Field), Field);
 }
Example #7
0
 public override int ReadBuffer(BinaryReader stream)
 {
     CVSReader.ReAllocBuff <uint>(ref CVSReader.uintBuffer, CVSReader.uintIndex);
     CVSReader.uintBuffer[CVSReader.uintIndex] = stream.ReadUInt32();
     return(CVSReader.uintIndex++);
 }
Example #8
0
 public bool Parse(string Field, ref string t)
 {
     t = CVSReader.LookupInterString(XSingleton <XCommon> .singleton.XHash(Field), Field);
     return(true);
 }
Example #9
0
 public override int DefaultValue()
 {
     CVSReader.ReAllocBuff <uint>(ref CVSReader.uintBuffer, CVSReader.uintIndex);
     CVSReader.uintBuffer[CVSReader.uintIndex] = 0u;
     return(CVSReader.uintIndex++);
 }
Example #10
0
 public override int ReadBuffer(BinaryReader stream)
 {
     CVSReader.ReAllocBuff <string>(ref CVSReader.stringBuffer, CVSReader.stringIndex);
     CVSReader.stringBuffer[CVSReader.stringIndex] = string.Intern(stream.ReadString());
     return(CVSReader.stringIndex++);
 }
Example #11
0
 public override int DefaultValue()
 {
     CVSReader.ReAllocBuff <string>(ref CVSReader.stringBuffer, CVSReader.stringIndex);
     CVSReader.stringBuffer[CVSReader.stringIndex] = "";
     return(CVSReader.stringIndex++);
 }
Example #12
0
 public override int ReadBuffer(BinaryReader stream)
 {
     CVSReader.ReAllocBuff <double>(ref CVSReader.doubleBuffer, CVSReader.doubleIndex);
     CVSReader.doubleBuffer[CVSReader.doubleIndex] = stream.ReadDouble();
     return(CVSReader.doubleIndex++);
 }
Example #13
0
 public override int DefaultValue()
 {
     CVSReader.ReAllocBuff <double>(ref CVSReader.doubleBuffer, CVSReader.doubleIndex);
     CVSReader.doubleBuffer[CVSReader.doubleIndex] = 0.0;
     return(CVSReader.doubleIndex++);
 }
Example #14
0
 public override int DefaultValue()
 {
     CVSReader.ReAllocBuff <float>(ref CVSReader.floatBuffer, CVSReader.floatIndex);
     CVSReader.floatBuffer[CVSReader.floatIndex] = 0f;
     return(CVSReader.floatIndex++);
 }
Example #15
0
 public override int ReadBuffer(BinaryReader stream)
 {
     CVSReader.ReAllocBuff <long>(ref CVSReader.longBuffer, CVSReader.longIndex);
     CVSReader.longBuffer[CVSReader.longIndex] = stream.ReadInt64();
     return(CVSReader.longIndex++);
 }