VirtualBox

Changeset 27607 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 22, 2010 6:13:07 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59148
Message:

Main: remove templates for 'weak' com pointers which do nothing anyway

Location:
trunk/src/VBox/Main
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r26753 r27607  
    318318////////////////////////////////////////////////////////////////////////////////
    319319
    320 DEFINE_EMPTY_CTOR_DTOR(Appliance)
     320Appliance::Appliance()
     321    : mVirtualBox(NULL)
     322{
     323}
     324
     325Appliance::~Appliance()
     326{
     327}
    321328
    322329/**
  • trunk/src/VBox/Main/AudioAdapterImpl.cpp

    r26235 r27607  
    3434/////////////////////////////////////////////////////////////////////////////
    3535
    36 DEFINE_EMPTY_CTOR_DTOR (AudioAdapter)
     36AudioAdapter::AudioAdapter()
     37    : mParent(NULL)
     38{
     39}
     40
     41AudioAdapter::~AudioAdapter()
     42{
     43}
    3744
    3845HRESULT AudioAdapter::FinalConstruct()
     
    4350void AudioAdapter::FinalRelease()
    4451{
    45     uninit ();
     52    uninit();
    4653}
    4754
     
    169176    mData.free();
    170177
    171     unconst(mPeer).setNull();
    172     unconst(mParent).setNull();
     178    unconst(mPeer) = NULL;
     179    unconst(mParent) = NULL;
    173180}
    174181
  • trunk/src/VBox/Main/AudioSnifferInterface.cpp

    r26173 r27607  
    6868// constructor / destructor
    6969//
    70 AudioSniffer::AudioSniffer(Console *console) : mpDrv(NULL)
    71 {
    72     mParent = console;
     70AudioSniffer::AudioSniffer(Console *console)
     71    : mpDrv(NULL),
     72      mParent(console)
     73{
    7374}
    7475
  • trunk/src/VBox/Main/BIOSSettingsImpl.cpp

    r27059 r27607  
    4040{
    4141    Data()
     42        : pMachine(NULL)
    4243    { }
    4344
    44     ComObjPtr<Machine, ComWeakRef>  pMachine;
    45     ComObjPtr<BIOSSettings>         pPeer;
     45    Machine * const             pMachine;
     46    ComObjPtr<BIOSSettings>     pPeer;
    4647
    4748    // use the XML settings structure in the members for simplicity
     
    115116    m = new Data();
    116117
    117     m->pMachine = aParent;
     118    unconst(m->pMachine) = aParent;
    118119    m->pPeer = that;
    119120
     
    145146    m = new Data();
    146147
    147     m->pMachine = aParent;
     148    unconst(m->pMachine) = aParent;
    148149    // mPeer is left null
    149150
     
    172173    m->bd.free();
    173174
    174     m->pPeer.setNull();
    175     m->pMachine.setNull();
     175    unconst(m->pPeer) = NULL;
     176    unconst(m->pMachine) = NULL;
    176177
    177178    delete m;
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r26782 r27607  
    21702170        return;
    21712171
    2172     unconst(mParent).setNull();
     2172    unconst(mParent) = NULL;
    21732173}
    21742174
  • trunk/src/VBox/Main/DHCPServerImpl.cpp

    r26163 r27607  
    3434/////////////////////////////////////////////////////////////////////////////
    3535
    36 DEFINE_EMPTY_CTOR_DTOR (DHCPServer)
     36DHCPServer::DHCPServer()
     37    : mVirtualBox(NULL)
     38{
     39}
     40
     41DHCPServer::~DHCPServer()
     42{
     43}
    3744
    3845HRESULT DHCPServer::FinalConstruct()
     
    5360        return;
    5461
    55     unconst(mVirtualBox).setNull();
     62    unconst(mVirtualBox) = NULL;
    5663}
    5764
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r27560 r27607  
    7676/////////////////////////////////////////////////////////////////////////////
    7777
    78 DEFINE_EMPTY_CTOR_DTOR(Display)
     78Display::Display()
     79    : mParent(NULL)
     80{
     81}
     82
     83Display::~Display()
     84{
     85}
     86
    7987
    8088HRESULT Display::FinalConstruct()
     
    663671        mParent->UnregisterCallback (this);
    664672
    665     unconst(mParent).setNull();
     673    unconst(mParent) = NULL;
    666674
    667675    if (mpDrv)
  • trunk/src/VBox/Main/GuestImpl.cpp

    r27190 r27607  
    111111        return;
    112112
    113     unconst(mParent).setNull();
     113    unconst(mParent) = NULL;
    114114}
    115115
  • trunk/src/VBox/Main/HostImpl.cpp

    r27537 r27607  
    157157    {};
    158158
    159     ComObjPtr<VirtualBox, ComWeakRef>
    160                             pParent;
     159    VirtualBox              *pParent;
    161160
    162161#ifdef VBOX_WITH_USB
  • trunk/src/VBox/Main/HostNetworkInterfaceImpl.cpp

    r26753 r27607  
    3434/////////////////////////////////////////////////////////////////////////////
    3535
    36 DEFINE_EMPTY_CTOR_DTOR (HostNetworkInterface)
     36HostNetworkInterface::HostNetworkInterface()
     37    : mVBox(NULL)
     38{
     39}
     40
     41HostNetworkInterface::~HostNetworkInterface()
     42{
     43}
    3744
    3845HRESULT HostNetworkInterface::FinalConstruct()
     
    550557    AutoCaller autoCaller(this);
    551558    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    552     mVBox = pVBox;
     559    unconst(mVBox) = pVBox;
    553560
    554561    /* If IPv4 address hasn't been initialized */
  • trunk/src/VBox/Main/KeyboardImpl.cpp

    r26235 r27607  
    120120    mfVMMDevInited = true;
    121121
    122     unconst(mParent).setNull();
     122    unconst(mParent) = NULL;
    123123}
    124124
  • trunk/src/VBox/Main/MachineDebuggerImpl.cpp

    r26235 r27607  
    4949/////////////////////////////////////////////////////////////////////////////
    5050
    51 DEFINE_EMPTY_CTOR_DTOR (MachineDebugger)
     51MachineDebugger::MachineDebugger()
     52    : mParent(NULL)
     53{
     54}
     55
     56MachineDebugger::~MachineDebugger()
     57{
     58}
    5259
    5360HRESULT MachineDebugger::FinalConstruct()
     
    111118        return;
    112119
    113     unconst(mParent).setNull();
     120    unconst(mParent) = NULL;
    114121    mFlushMode = false;
    115122}
  • trunk/src/VBox/Main/MachineImpl.cpp

    r27537 r27607  
    238238
    239239Machine::Machine()
     240    : mPeer(NULL), mParent(NULL)
    240241{}
    241242
     
    607608
    608609    /* mParent is constant during life time, no need to lock */
    609     mParent.queryInterfaceTo(aParent);
     610    ComObjPtr<VirtualBox> pVirtualBox(mParent);
     611    pVirtualBox.queryInterfaceTo(aParent);
    610612
    611613    return S_OK;
     
    60506052
    60516053/**
     6054 *  Returns a pointer to the Machine object for this machine that acts like a
     6055 *  parent for complex machine data objects such as shared folders, etc.
     6056 *
     6057 *  For primary Machine objects and for SnapshotMachine objects, returns this
     6058 *  object's pointer itself. For SessoinMachine objects, returns the peer
     6059 *  (primary) machine pointer.
     6060 */
     6061Machine* Machine::getMachine()
     6062{
     6063    if (getClassID() == clsidSessionMachine)
     6064        return (Machine*)mPeer;
     6065    return this;
     6066}
     6067
     6068/**
    60526069 * Makes sure that there are no machine state dependants. If necessary, waits
    60536070 * for the number of dependants to drop to zero.
     
    90849101        uninitDataAndChildObjects();
    90859102        mData.free();
    9086         unconst(mParent).setNull();
    9087         unconst(mPeer).setNull();
     9103        unconst(mParent) = NULL;
     9104        unconst(mPeer) = NULL;
    90889105        LogFlowThisFuncLeave();
    90899106        return;
     
    92799296    alock.leave();
    92809297
    9281     unconst(mParent).setNull();
    9282     unconst(mPeer).setNull();
     9298    unconst(mParent) = NULL;
     9299    unconst(mPeer) = NULL;
    92839300
    92849301    LogFlowThisFuncLeave();
     
    92949311RWLockHandle *SessionMachine::lockHandle() const
    92959312{
    9296     AssertReturn(!mPeer.isNull(), NULL);
     9313    AssertReturn(mPeer != NULL, NULL);
    92979314    return mPeer->lockHandle();
    92989315}
     
    95889605        ComObjPtr<Progress> progress;
    95899606        progress.createObject();
    9590         progress->init(mParent, static_cast<IMachine *>(mPeer),
     9607        progress->init(mParent, mPeer,
    95919608                       Bstr(tr("Closing session")), FALSE /* aCancelable */);
    95929609        progress.queryInterfaceTo(aProgress);
  • trunk/src/VBox/Main/MediumAttachmentImpl.cpp

    r26562 r27607  
    6161{
    6262    Data()
     63        : pMachine(NULL)
    6364    { }
    6465
    6566    /** Reference to Machine object, for checking mutable state. */
    66     const ComObjPtr<Machine, ComWeakRef> pMachine;
     67    Machine * const pMachine;
    6768    /* later: const ComObjPtr<MediumAttachment> mPeer; */
    6869
     
    164165    m->bd.free();
    165166
    166     unconst(m->pMachine).setNull();
     167    unconst(m->pMachine) = NULL;
    167168
    168169    delete m;
  • trunk/src/VBox/Main/MediumImpl.cpp

    r27592 r27607  
    8888{
    8989    Data()
    90         : state(MediumState_NotCreated),
     90        : pVirtualBox(NULL),
     91          state(MediumState_NotCreated),
    9192          size(0),
    9293          readers(0),
     
    108109
    109110    /** weak VirtualBox parent */
    110     const ComObjPtr<VirtualBox, ComWeakRef> pVirtualBox;
     111    VirtualBox * const pVirtualBox;
    111112
    112113    const Guid id;
     
    13711372    m->queryInfoSem = NIL_RTSEMEVENTMULTI;
    13721373
    1373     unconst(m->pVirtualBox).setNull();
     1374    unconst(m->pVirtualBox) = NULL;
    13741375}
    13751376
  • trunk/src/VBox/Main/MouseImpl.cpp

    r27403 r27607  
    6363/////////////////////////////////////////////////////////////////////////////
    6464
    65 DEFINE_EMPTY_CTOR_DTOR (Mouse)
     65Mouse::Mouse()
     66    : mParent(NULL)
     67{
     68}
     69
     70Mouse::~Mouse()
     71{
     72}
     73
    6674
    6775HRESULT Mouse::FinalConstruct()
     
    138146    mParent = NULL;
    139147#else
    140     unconst(mParent).setNull();
     148    unconst(mParent) = NULL;
    141149#endif
    142150}
  • trunk/src/VBox/Main/NetworkAdapterImpl.cpp

    r26818 r27607  
    3737////////////////////////////////////////////////////////////////////////////////
    3838
    39 DEFINE_EMPTY_CTOR_DTOR (NetworkAdapter)
     39NetworkAdapter::NetworkAdapter()
     40    : mParent(NULL)
     41{
     42}
     43
     44NetworkAdapter::~NetworkAdapter()
     45{
     46}
    4047
    4148HRESULT NetworkAdapter::FinalConstruct()
     
    174181    mData.free();
    175182
    176     unconst(mPeer).setNull();
    177     unconst(mParent).setNull();
     183    unconst(mPeer) = NULL;
     184    unconst(mParent) = NULL;
    178185}
    179186
  • trunk/src/VBox/Main/ParallelPortImpl.cpp

    r26235 r27607  
    4242{
    4343    Data()
    44         : fModified(false)
     44        : fModified(false),
     45          pMachine(NULL)
    4546    { }
    4647
    4748    bool                                    fModified;
    4849
    49     const ComObjPtr<Machine, ComWeakRef>    pMachine;
     50    Machine * const                         pMachine;
    5051    const ComObjPtr<ParallelPort>           pPeer;
    5152
     
    186187    m->bd.free();
    187188
    188     unconst(m->pPeer).setNull();
    189     unconst(m->pMachine).setNull();
     189    unconst(m->pPeer) = NULL;
     190    unconst(m->pMachine) = NULL;
    190191
    191192    delete m;
  • trunk/src/VBox/Main/ProgressImpl.cpp

    r26603 r27607  
    4848////////////////////////////////////////////////////////////////////////////////
    4949
    50 DEFINE_EMPTY_CTOR_DTOR (ProgressBase)
     50ProgressBase::ProgressBase()
     51#if !defined (VBOX_COM_INPROC)
     52    : mParent(NULL)
     53#endif
     54{
     55}
     56
     57ProgressBase::~ProgressBase()
     58{
     59}
     60
    5161
    5262/**
     
    92102 *                      NULL which means initiator = parent, otherwise must not
    93103 *                      be NULL).
    94  * @param aDescription  Task description.
     104 * @param aDescription  ask description.
    95105 * @param aID           Address of result GUID structure (optional).
    96106 *
     
    127137     * (to avoid cycling); otherwise mInitiator will remain null which means
    128138     * that it is the same as the parent */
    129     if (aInitiator && !mParent.equalsTo (aInitiator))
    130         unconst(mInitiator) = aInitiator;
     139    if (aInitiator)
     140    {
     141        ComObjPtr<VirtualBox> pVirtualBox(mParent);
     142        if (!pVirtualBox.equalsTo(aInitiator))
     143            unconst(mInitiator) = aInitiator;
     144    }
    131145#else
    132146    unconst(mInitiator) = aInitiator;
     
    191205            mParent->removeProgress (mId);
    192206
    193         unconst(mParent).setNull();
     207        unconst(mParent) = NULL;
    194208    }
    195209#endif
     
    238252        mInitiator.queryInterfaceTo(aInitiator);
    239253    else
    240         mParent.queryInterfaceTo(aInitiator);
     254    {
     255        ComObjPtr<VirtualBox> pVirtualBox(mParent);
     256        pVirtualBox.queryInterfaceTo(aInitiator);
     257    }
    241258#else
    242259    mInitiator.queryInterfaceTo(aInitiator);
  • trunk/src/VBox/Main/SerialPortImpl.cpp

    r27059 r27607  
    4343{
    4444    Data()
    45         : fModified(false)
     45        : fModified(false),
     46          pMachine(NULL)
    4647    { }
    4748
    48     bool                                    fModified;
    49 
    50     const ComObjPtr<Machine, ComWeakRef>    pMachine;
    51     const ComObjPtr<SerialPort>             pPeer;
    52 
    53     Backupable<settings::SerialPort>        bd;
     49    bool                                fModified;
     50
     51    Machine * const                     pMachine;
     52    const ComObjPtr<SerialPort>         pPeer;
     53
     54    Backupable<settings::SerialPort>    bd;
    5455};
    5556
     
    189190    m->bd.free();
    190191
    191     unconst(m->pPeer).setNull();
    192     unconst(m->pMachine).setNull();
     192    unconst(m->pPeer) = NULL;
     193    unconst(m->pMachine) = NULL;
    193194
    194195    delete m;
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r26753 r27607  
    3636
    3737SharedFolder::SharedFolder()
    38     : mParent (NULL)
     38    : mParent(NULL),
     39      mMachine(NULL),
     40      mConsole(NULL),
     41      mVirtualBox(NULL)
    3942{
    4043}
     
    248251    unconst(mParent) = NULL;
    249252
    250     unconst(mMachine).setNull();
    251     unconst(mConsole).setNull();
    252     unconst(mVirtualBox).setNull();
     253    unconst(mMachine) = NULL;
     254    unconst(mConsole) = NULL;
     255    unconst(mVirtualBox) = NULL;
    253256}
    254257
  • trunk/src/VBox/Main/SnapshotImpl.cpp

    r27278 r27607  
    7777{
    7878    Data()
     79        : pVirtualBox(NULL)
    7980    {
    8081        RTTimeSpecSetMilli(&timeStamp, 0);
     
    9192
    9293    /** weak VirtualBox parent */
    93     const ComObjPtr<VirtualBox, ComWeakRef> pVirtualBox;
     94    VirtualBox * const          pVirtualBox;
    9495
    9596    // pParent and llChildren are protected by Machine::snapshotsTreeLockHandle()
     
    10491050    mData.free();
    10501051
    1051     unconst(mParent).setNull();
    1052     unconst(mPeer).setNull();
     1052    unconst(mParent) = NULL;
     1053    unconst(mPeer) = NULL;
    10531054
    10541055    LogFlowThisFuncLeave();
     
    10611062RWLockHandle *SnapshotMachine::lockHandle() const
    10621063{
    1063     AssertReturn(!mPeer.isNull(), NULL);
     1064    AssertReturn(mPeer != NULL, NULL);
    10641065    return mPeer->lockHandle();
    10651066}
  • trunk/src/VBox/Main/StorageControllerImpl.cpp

    r26235 r27607  
    8080{
    8181    Data()
     82        : pParent(NULL)
    8283    { }
    8384
    84     const ComObjPtr<Machine, ComWeakRef>    pParent;
    85     const ComObjPtr<StorageController>      pPeer;
     85    Machine * const                     pParent;
     86    const ComObjPtr<StorageController>  pPeer;
    8687
    8788    Backupable<BackupableStorageControllerData> bd;
     
    290291    m->pParent->removeDependentChild(this);
    291292
    292     unconst(m->pPeer).setNull();
    293     unconst(m->pParent).setNull();
     293    unconst(m->pPeer) = NULL;
     294    unconst(m->pParent) = NULL;
    294295
    295296    delete m;
     
    775776    }
    776777
    777     unconst(m->pPeer).setNull();
    778 }
    779 
    780 const ComObjPtr<Machine, ComWeakRef>& StorageController::getMachine()
     778    unconst(m->pPeer) = NULL;
     779}
     780
     781Machine* StorageController::getMachine()
    781782{
    782783    return m->pParent;
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r26753 r27607  
    4747/////////////////////////////////////////////////////////////////////////////
    4848
    49 DEFINE_EMPTY_CTOR_DTOR (SystemProperties)
     49SystemProperties::SystemProperties()
     50    : mParent(NULL)
     51{
     52}
     53
     54SystemProperties::~SystemProperties()
     55{
     56}
     57
    5058
    5159HRESULT SystemProperties::FinalConstruct()
     
    170178        return;
    171179
    172     unconst(mParent).setNull();
     180    unconst(mParent) = NULL;
    173181}
    174182
  • trunk/src/VBox/Main/USBControllerImpl.cpp

    r26968 r27607  
    6262struct USBController::Data
    6363{
    64     Data() {};
    65     ~Data() {};
     64    Data()
     65        : pParent(NULL)
     66    {};
     67
     68    ~Data()
     69    {};
    6670
    6771    /** Parent object. */
    68     const ComObjPtr<Machine, ComWeakRef> pParent;
     72    Machine * const                pParent;
    6973    /** Peer object. */
    70     const ComObjPtr<USBController> pPeer;
    71 
    72     Backupable<BackupableUSBData>  bd;
     74    const ComObjPtr<USBController>  pPeer;
     75
     76    Backupable<BackupableUSBData>   bd;
    7377#ifdef VBOX_WITH_USB
    7478    // the following fields need special backup/rollback/commit handling,
     
    250254    m->bd.free();
    251255
    252     unconst(m->pPeer).setNull();
    253     unconst(m->pParent).setNull();
     256    unconst(m->pPeer) = NULL;
     257    unconst(m->pParent) = NULL;
    254258
    255259    delete m;
  • trunk/src/VBox/Main/VFSExplorerImpl.cpp

    r26753 r27607  
    6767};
    6868
    69 DEFINE_EMPTY_CTOR_DTOR(VFSExplorer)
     69VFSExplorer::VFSExplorer()
     70    : mVirtualBox(NULL)
     71{
     72}
     73
     74VFSExplorer::~VFSExplorer()
     75{
     76}
     77
    7078
    7179/**
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r26782 r27607  
    8989// constructor / destructor
    9090//
    91 VMMDev::VMMDev(Console *console) : mpDrv(NULL)
    92 {
    93     mParent = console;
     91VMMDev::VMMDev(Console *console)
     92    : mpDrv(NULL),
     93      mParent(console)
     94{
    9495    int rc = RTSemEventCreate(&mCredentialsEvent);
    9596    AssertRC(rc);
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r27257 r27607  
    136136     *  is bound to the lifetime of the VirtualBox instance, so it's safe.
    137137     */
    138     ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
     138    VirtualBox        *mVirtualBox;
    139139};
    140140
     
    43454345void *VirtualBox::CallbackEvent::handler()
    43464346{
    4347     if (mVirtualBox.isNull())
     4347    if (!mVirtualBox)
    43484348        return NULL;
    43494349
     
    43554355                         autoCaller.state()));
    43564356        /* We don't need mVirtualBox any more, so release it */
    4357         mVirtualBox.setNull();
     4357        mVirtualBox = NULL;
    43584358        return NULL;
    43594359    }
     
    43654365        callbacks = mVirtualBox->m->llCallbacks;
    43664366        /* We don't need mVirtualBox any more, so release it */
    4367         mVirtualBox.setNull();
     4367        mVirtualBox = NULL;
    43684368    }
    43694369
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r26603 r27607  
    8585private:
    8686    /** weak VirtualBox parent */
    87     const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
     87    VirtualBox* const  mVirtualBox;
    8888
    8989    struct Data;            // opaque, defined in ApplianceImpl.cpp
  • trunk/src/VBox/Main/include/AudioAdapterImpl.h

    r26171 r27607  
    9393private:
    9494
    95     const ComObjPtr<Machine, ComWeakRef> mParent;
     95    Machine * const    mParent;
    9696    const ComObjPtr<AudioAdapter> mPeer;
    9797
    98     Backupable<Data> mData;
     98    Backupable<Data>    mData;
    9999};
    100100
  • trunk/src/VBox/Main/include/AudioSnifferInterface.h

    r26173 r27607  
    4747    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    4848
    49     ComObjPtr<Console, ComWeakRef> mParent;
     49    Console * const    mParent;
    5050};
    5151
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r25728 r27607  
    287287private:
    288288
    289     const ComObjPtr<Console, ComWeakRef> mParent;
     289    Console * const        mParent;
    290290};
    291291
  • trunk/src/VBox/Main/include/DHCPServerImpl.h

    r26163 r27607  
    8888private:
    8989    /** weak VirtualBox parent */
    90     const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
     90    VirtualBox * const      mVirtualBox;
    9191
    9292    const Bstr mName;
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r26782 r27607  
    304304    static DECLCALLBACK(int)   displaySSMLoad(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
    305305
    306     const ComObjPtr<Console, ComWeakRef> mParent;
     306    Console * const        mParent;
    307307    /** Pointer to the associated display driver. */
    308308    struct DRVMAINDISPLAY  *mpDrv;
  • trunk/src/VBox/Main/include/GuestImpl.h

    r27190 r27607  
    104104    ULONG mCurrentGuestStat[GuestStatisticType_MaxVal];
    105105
    106     ComObjPtr<Console, ComWeakRef> mParent;
     106    Console *mParent;
    107107    Data mData;
    108108};
  • trunk/src/VBox/Main/include/HostNetworkInterfaceImpl.h

    r23223 r27607  
    9595    HostNetworkInterfaceType_T mIfType;
    9696
    97     ComObjPtr<VirtualBox, ComWeakRef> mVBox;
     97    VirtualBox * const mVBox;
    9898
    9999    struct Data
  • trunk/src/VBox/Main/include/HostPower.h

    r26044 r27607  
    5151protected:
    5252
    53     ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
     53    VirtualBox              *mVirtualBox;
    5454
    55     std::vector <ComPtr<IConsole> > mConsoles;
     55    std::vector< ComPtr<IConsole> > mConsoles;
    5656};
    5757
  • trunk/src/VBox/Main/include/KeyboardImpl.h

    r26173 r27607  
    9696    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    9797
    98     const ComObjPtr<Console, ComWeakRef> mParent;
     98    Console * const        mParent;
    9999    /** Pointer to the associated keyboard driver. */
    100100    struct DRVMAINKEYBOARD *mpDrv;
  • trunk/src/VBox/Main/include/MachineDebuggerImpl.h

    r23223 r27607  
    9696    bool queueSettings() const;
    9797
    98     const ComObjPtr<Console, ComWeakRef> mParent;
     98    Console * const mParent;
    9999    // flags whether settings have been queued because
    100100    // they could not be sent to the VM (not up yet, etc.)
  • trunk/src/VBox/Main/include/MachineImpl.h

    r27537 r27607  
    542542     * one) or after doing addCaller() manually.
    543543     */
    544     const ComObjPtr<VirtualBox, ComWeakRef>& getVirtualBox() const { return mParent; }
     544    VirtualBox* getVirtualBox() const { return mParent; }
    545545
    546546    /**
     
    685685    HRESULT checkStateDependency(StateDependency aDepType);
    686686
    687     inline Machine *getMachine();
     687    Machine *getMachine();
    688688
    689689    void ensureNoStateDependencies();
     
    776776#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    777777
    778     const ComObjPtr<Machine, ComWeakRef> mPeer;
    779 
    780     const ComObjPtr<VirtualBox, ComWeakRef> mParent;
     778    Machine* const          mPeer;
     779
     780    VirtualBox* const      mParent;
    781781
    782782    uint32_t                m_flModifications;
     
    10721072}
    10731073
    1074 ////////////////////////////////////////////////////////////////////////////////
    1075 
    1076 /**
    1077  *  Returns a pointer to the Machine object for this machine that acts like a
    1078  *  parent for complex machine data objects such as shared folders, etc.
    1079  *
    1080  *  For primary Machine objects and for SnapshotMachine objects, returns this
    1081  *  object's pointer itself. For SessoinMachine objects, returns the peer
    1082  *  (primary) machine pointer.
    1083  */
    1084 inline Machine *Machine::getMachine()
    1085 {
    1086     if (getClassID() == clsidSessionMachine)
    1087         return mPeer;
    1088     return this;
    1089 }
    1090 
    10911074
    10921075#endif // ____H_MACHINEIMPL
  • trunk/src/VBox/Main/include/MouseImpl.h

    r27159 r27607  
    138138    Console *mParent;
    139139#else
    140     const ComObjPtr<Console, ComWeakRef> mParent;
     140    Console * const        mParent;
    141141#endif
    142142    /** Pointer to the associated mouse driver. */
  • trunk/src/VBox/Main/include/NetworkAdapterImpl.h

    r26171 r27607  
    138138    void generateMACAddress();
    139139
    140     const ComObjPtr<Machine, ComWeakRef> mParent;
     140    Machine * const    mParent;
    141141    const ComObjPtr<NetworkAdapter> mPeer;
    142142
    143     bool m_fModified;
    144     Backupable<Data> mData;
     143    bool                m_fModified;
     144    Backupable<Data>    mData;
    145145};
    146146
  • trunk/src/VBox/Main/include/ProgressImpl.h

    r26603 r27607  
    9999#if !defined (VBOX_COM_INPROC)
    100100    /** Weak parent. */
    101     const ComObjPtr<VirtualBox, ComWeakRef> mParent;
    102 #endif
    103 
    104     const ComPtr<IUnknown> mInitiator;
     101    VirtualBox * const      mParent;
     102#endif
     103
     104    const ComPtr<IUnknown>  mInitiator;
    105105
    106106    const Guid mId;
  • trunk/src/VBox/Main/include/SharedFolderImpl.h

    r26044 r27607  
    9797private:
    9898
    99     VirtualBoxBase *const mParent;
     99    VirtualBoxBase * const mParent;
    100100
    101101    /* weak parents (only one of them is not null) */
    102     const ComObjPtr<Machine, ComWeakRef> mMachine;
    103     const ComObjPtr<Console, ComWeakRef> mConsole;
    104     const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
     102    Machine * const        mMachine;
     103    Console * const        mConsole;
     104    VirtualBox * const      mVirtualBox;
    105105
    106106    Data m;
  • trunk/src/VBox/Main/include/StorageControllerImpl.h

    r26171 r27607  
    9898
    9999    /** @note this doesn't require a read lock since mParent is constant. */
    100     const ComObjPtr<Machine, ComWeakRef>& getMachine();
     100    Machine* getMachine();
    101101
    102102    ComObjPtr<StorageController> getPeer();
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r26044 r27607  
    124124    HRESULT setWebServiceAuthLibrary(const Utf8Str &aPath);
    125125
    126     const ComObjPtr<VirtualBox, ComWeakRef> mParent;
     126    VirtualBox * const mParent;
    127127
    128     Utf8Str m_strDefaultMachineFolder;
    129     Utf8Str m_strDefaultMachineFolderFull;
    130     Utf8Str m_strDefaultHardDiskFolder;
    131     Utf8Str m_strDefaultHardDiskFolderFull;
    132     Utf8Str m_strDefaultHardDiskFormat;
     128    Utf8Str             m_strDefaultMachineFolder;
     129    Utf8Str             m_strDefaultMachineFolderFull;
     130    Utf8Str             m_strDefaultHardDiskFolder;
     131    Utf8Str             m_strDefaultHardDiskFolderFull;
     132    Utf8Str             m_strDefaultHardDiskFormat;
    133133
    134     MediumFormatList mMediumFormats;
     134    MediumFormatList    mMediumFormats;
    135135
    136     Utf8Str m_strRemoteDisplayAuthLibrary;
    137     Utf8Str m_strWebServiceAuthLibrary;
    138     ULONG mLogHistoryCount;
    139     AudioDriverType_T mDefaultAudioDriver;
     136    Utf8Str             m_strRemoteDisplayAuthLibrary;
     137    Utf8Str             m_strWebServiceAuthLibrary;
     138    ULONG               mLogHistoryCount;
     139    AudioDriverType_T   mDefaultAudioDriver;
    140140
    141141    friend class VirtualBox;
  • trunk/src/VBox/Main/include/VFSExplorerImpl.h

    r26044 r27607  
    7575private:
    7676    /* Private member vars */
    77     const ComObjPtr<VirtualBox, ComWeakRef> mVirtualBox;
     77    VirtualBox * const mVirtualBox;
    7878
    7979    struct TaskVFSExplorer;  /* Worker thread helper */
  • trunk/src/VBox/Main/include/VMMDev.h

    r26173 r27607  
    6464    static DECLCALLBACK(void)   drvReset(PPDMDRVINS pDrvIns);
    6565
    66     ComObjPtr<Console, ComWeakRef> mParent;
     66    Console * const        mParent;
    6767
    6868    RTSEMEVENT mCredentialsEvent;
  • trunk/src/VBox/Main/include/VRDPServerImpl.h

    r26171 r27607  
    108108private:
    109109
    110     const ComObjPtr<Machine, ComWeakRef> mParent;
     110    Machine * const    mParent;
    111111    const ComObjPtr<VRDPServer> mPeer;
    112112
    113     Backupable<Data> mData;
     113    Backupable<Data>    mData;
    114114};
    115115
  • trunk/src/VBox/Main/include/objectslist.h

    r25894 r27607  
    5050{
    5151public:
    52     typedef ComObjPtr<T, ComStrongRef> MyType;
     52    typedef ComObjPtr<T> MyType;
    5353    typedef std::list<MyType> MyList;
    5454
Note: See TracChangeset for help on using the changeset viewer.

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