예제 #1
0
        public WDC1Row(WDC1Reader reader, BitReader data, int id, int refId, Dictionary <long, string> stringsTable)
        {
            m_reader = reader;
            m_data   = data;
            m_refId  = refId;

            m_dataOffset = m_data.Offset;

            m_fieldMeta    = reader.Meta;
            m_columnMeta   = reader.ColumnMeta;
            m_palletData   = reader.PalletData;
            m_commonData   = reader.CommonData;
            m_stringsTable = stringsTable;

            if (id != -1)
            {
                m_id = id;
            }
            else
            {
                int idFieldIndex = reader.IdFieldIndex;

                m_data.Position = m_columnMeta[idFieldIndex].RecordOffset;

                m_id = FieldReader.GetFieldValue <int>(0, m_data, m_fieldMeta[idFieldIndex], m_columnMeta[idFieldIndex], m_palletData[idFieldIndex], m_commonData[idFieldIndex]);
            }
        }
예제 #2
0
        public WDC1Row(WDC1Reader reader, BitReader data, uint id, ReferenceEntry?refData)
        {
            m_reader = reader;
            m_data   = data;

            Offset = m_data.Offset;

            fieldMeta    = reader.Meta;
            columnMeta   = reader.ColumnMeta;
            palletData   = reader.PalletData;
            commonData   = reader.CommonData;
            this.refData = refData;

            if (id != 0xFFFFFFFF)
            {
                Id = id;
            }
            else
            {
                int idFieldIndex = reader.IdFieldIndex;

                m_data.Position = columnMeta[idFieldIndex].RecordOffset;
                m_data.Offset   = Offset;

                Id = GetFieldValue <uint>(m_data, fieldMeta[idFieldIndex], columnMeta[idFieldIndex], palletData[idFieldIndex], commonData[idFieldIndex]);
            }
        }