VirtualBox

Ignore:
Timestamp:
May 17, 2016 5:18:29 PM (9 years ago)
Author:
vboxsync
Message:

Main: big settings cleanup and writing optimization. Moved constructors/equality/default checks into the .cpp file, and write only settings which aren't at the default value. Greatly reduces the effort needed to write everything out, especially when a lot of snapshots have to be dealt with. Move the storage controllers to the hardware settings, where they always belonged. No change to the XML file (yet). Lots of settings related cleanups in the API code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r60404 r61009  
    55
    66/*
    7  * Copyright (C) 2005-2015 Oracle Corporation
     7 * Copyright (C) 2005-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    6868#endif
    6969#include "BusAssignmentManager.h"
     70#include "PCIDeviceAttachmentImpl.h"
    7071#include "EmulatedUSBImpl.h"
    7172
     
    20002001
    20012002    if (mBusMgr)
    2002         mBusMgr->listAttachedPCIDevices(aAttachedPCIDevices);
     2003    {
     2004        std::vector<BusAssignmentManager::PCIDeviceInfo> devInfos;
     2005        mBusMgr->listAttachedPCIDevices(devInfos);
     2006        ComObjPtr<PCIDeviceAttachment> dev;
     2007        aAttachedPCIDevices.resize(devInfos.size());
     2008        for (size_t i = 0; i < devInfos.size(); i++)
     2009        {
     2010            const BusAssignmentManager::PCIDeviceInfo &devInfo = devInfos[i];
     2011            dev.createObject();
     2012            dev->init(NULL, devInfo.strDeviceName,
     2013                      devInfo.hostAddress.valid() ? devInfo.hostAddress.asLong() : -1,
     2014                      devInfo.guestAddress.asLong(),
     2015                      devInfo.hostAddress.valid());
     2016            dev.queryInterfaceTo(aAttachedPCIDevices[i].asOutParam());
     2017        }
     2018    }
    20032019    else
    20042020        aAttachedPCIDevices.resize(0);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette