예제 #1
0
        public override void OnPopulate()
        {
            RBNK_DATAHeader *header = Header;
            VoidPtr          offset = &header->_list;
            int count = header->_list._numEntries;

            LabelItem[] list = ((RBNKNode)_parent)._labels;  //Get labels from parent
            ((RBNKNode)_parent)._labels = null;              //Clear labels, no more use for them!

            for (int i = 0; i < count; i++)
            {
                ruint         entry = header->_list.Entries[i];
                RBNKEntryNode e     = null;
                switch (entry._dataType) //RegionTableType
                {
                default:
                    e = new RBNKNullNode();
                    if (list != null)
                    {
                        (e as RBNKNullNode)._key = (byte)list[i].Tag;
                    }

                    (e as RBNKNullNode)._invalid = true;
                    break;

                case 1:     //InstParam
                    e = new RBNKDataInstParamNode();
                    if (list != null)
                    {
                        (e as RBNKDataInstParamNode)._key = (byte)list[i].Tag;
                    }

                    break;

                case 2:     //RangeTable
                    e = new RBNKDataRangeTableNode();
                    break;

                case 3:     //IndexTable
                    e = new RBNKDataIndexTableNode();
                    break;

                case 4:
                    e = new RBNKNullNode();
                    (e as RBNKNullNode)._key = (byte)list[i].Tag;
                    break;
                }

                if (e != null)
                {
                    e._offset = offset;
                    if (list != null)
                    {
                        e._name = list[i].String;
                    }

                    e.Initialize(this, header->_list.Get(offset, i), 0);
                }
            }
        }
 public override void OnPopulate()
 {
     for (byte i = Min; i <= Max; i++)
     {
         VoidPtr addr = _offset + Header->_collection.Entries[i - Min];
         RBNKEntryNode e = null;
         switch (Header->_collection.Entries[i - Min]._dataType) //RegionTableType
         {
             default:
                 e = new RBNKNullNode();
                 (e as RBNKNullNode)._key = i;
                 (e as RBNKNullNode)._invalid = true;
                 break;
             case 1: //InstParam
                 e = new RBNKDataInstParamNode();
                 (e as RBNKDataInstParamNode)._key = i;
                 break;
             case 2: //RangeTable
                 e = new RBNKDataRangeTableNode();
                 break;
             case 3: //IndexTable
                 e = new RBNKDataIndexTableNode();
                 break;
             case 4:
                 e = new RBNKNullNode();
                 (e as RBNKNullNode)._key = i;
                 break;
         }
         if (e != null)
             e.Initialize(this, addr, 0);
     }
 }
        public override void OnPopulate()
        {
            RBNK_DATAHeader* header = Header;
            VoidPtr offset = &header->_list;
            int count = header->_list._numEntries;

            LabelItem[] list = ((RBNKNode)_parent)._labels; //Get labels from parent
            ((RBNKNode)_parent)._labels = null; //Clear labels, no more use for them!

            for (int i = 0; i < count; i++)
            {
                ruint entry = header->_list.Entries[i];
                RBNKEntryNode e = null;
                switch (entry._dataType) //RegionTableType
                {
                    default:
                        e = new RBNKNullNode();
                        if (list != null)
                            (e as RBNKNullNode)._key = (byte)list[i].Tag;
                        (e as RBNKNullNode)._invalid = true;
                        break;
                    case 1: //InstParam
                        e = new RBNKDataInstParamNode();
                        if (list != null)
                            (e as RBNKDataInstParamNode)._key = (byte)list[i].Tag;
                        break;
                    case 2: //RangeTable
                        e = new RBNKDataRangeTableNode();
                        break;
                    case 3: //IndexTable
                        e = new RBNKDataIndexTableNode();
                        break;
                    case 4:
                        e = new RBNKNullNode();
                        (e as RBNKNullNode)._key = (byte)list[i].Tag;
                        break;
                }
                if (e != null)
                {
                    e._offset = offset;
                    if (list != null)
                        e._name = list[i].String;
                    e.Initialize(this, header->_list.Get(offset, i), 0);
                }
            }
        }
예제 #4
0
        public override void OnPopulate()
        {
            RuintCollection *c = Header->Collection;

            for (int i = 0; i < _keys.Length; i++)
            {
                VoidPtr       addr = _offset + c->Entries[i];
                RBNKEntryNode e    = null;
                switch (c->Entries[i]._dataType) //RegionTableType
                {
                default:
                    e = new RBNKNullNode();
                    (e as RBNKDataEntryNode)._key = _keys[i];
                    (e as RBNKNullNode)._invalid  = true;
                    break;

                case 1:     //InstParam
                    e = new RBNKDataInstParamNode();
                    (e as RBNKDataEntryNode)._key = _keys[i];
                    break;

                case 2:     //RangeTable
                    e = new RBNKDataRangeTableNode();
                    break;

                case 3:     //IndexTable
                    e = new RBNKDataIndexTableNode();
                    break;

                case 4:
                    e = new RBNKNullNode();
                    (e as RBNKNullNode)._key = _keys[i];
                    break;
                }
                if (e != null)
                {
                    e.Initialize(this, addr, 0);
                }
            }
        }
예제 #5
0
        public override void OnPopulate()
        {
            for (byte i = Min; i <= Max; i++)
            {
                VoidPtr       addr = _offset + Header->_collection.Entries[i - Min];
                RBNKEntryNode e    = null;
                switch (Header->_collection.Entries[i - Min]._dataType) //RegionTableType
                {
                default:
                    e = new RBNKNullNode();
                    (e as RBNKNullNode)._key     = i;
                    (e as RBNKNullNode)._invalid = true;
                    break;

                case 1:     //InstParam
                    e = new RBNKDataInstParamNode();
                    (e as RBNKDataInstParamNode)._key = i;
                    break;

                case 2:     //RangeTable
                    e = new RBNKDataRangeTableNode();
                    break;

                case 3:     //IndexTable
                    e = new RBNKDataIndexTableNode();
                    break;

                case 4:
                    e = new RBNKNullNode();
                    (e as RBNKNullNode)._key = i;
                    break;
                }
                if (e != null)
                {
                    e.Initialize(this, addr, 0);
                }
            }
        }
 public override void OnPopulate()
 {
     RuintCollection* c = Header->Collection;
     for (int i = 0; i < _keys.Length; i++)
     {
         VoidPtr addr = _offset + c->Entries[i];
         RBNKEntryNode e = null;
         switch (c->Entries[i]._dataType) //RegionTableType
         {
             default:
                 e = new RBNKNullNode();
                 (e as RBNKDataEntryNode)._key = _keys[i];
                 (e as RBNKNullNode)._invalid = true;
                 break;
             case 1: //InstParam
                 e = new RBNKDataInstParamNode();
                 (e as RBNKDataEntryNode)._key = _keys[i];
                 break;
             case 2: //RangeTable
                 e = new RBNKDataRangeTableNode();
                 break;
             case 3: //IndexTable
                 e = new RBNKDataIndexTableNode();
                 break;
             case 4:
                 e = new RBNKNullNode();
                 (e as RBNKNullNode)._key = _keys[i];
                 break;
         }
         if (e != null)
             e.Initialize(this, addr, 0);
     }
 }